forked from mod-audio/mod-plugin-builder
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-mount.sh
executable file
·30 lines (22 loc) · 1.02 KB
/
docker-mount.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
set -e
#######################################################################################################################
# check arguments
PLATFORM="${1}"
DOCKER_IMAGE="${2}"
if [[ "${PLATFORM}" == "" ]] || [[ "${DOCKER_IMAGE}" == "" ]]; then
echo "Usage: $0 <platform> <docker-image>"
echo " Where platform can be modduo[-static], modduox[-static], moddwarf or x86_64"
exit 1
fi
#######################################################################################################################
# Import common code and variables
cd $(dirname ${0})
source .common
#######################################################################################################################
# Now setup docker mountpoints (or run it if already exists)
if docker ps -a | grep -q "mpb_${PLATFORM}"; then
docker start -i "mpb_${PLATFORM}"
else
docker run --name "mpb_${PLATFORM}" -ti -v $(pwd):/home/builder/mod-plugin-builder -v ${PLUGINS_DIR}:/home/builder/mod-workdir/${PLATFORM}/plugins "${DOCKER_IMAGE}"
fi