forked from mod-audio/mod-plugin-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-mount.sh
More file actions
executable file
·31 lines (22 loc) · 1.1 KB
/
docker-mount.sh
File metadata and controls
executable file
·31 lines (22 loc) · 1.1 KB
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
31
#!/bin/bash
set -e
cd $(dirname ${0})
#######################################################################################################################
# check arguments
PLATFORM="${1}"
DOCKER_IMAGE="${2}"
if [ -z "${PLATFORM}" ] || [ -z "${DOCKER_IMAGE}" ] || [ ! -e "plugins-dep/configs/${PLATFORM}_defconfig" ]; then
echo "Usage: $0 <platform> <docker-image>"
echo " Where platform can be one of: $(echo $(ls plugins-dep/configs | grep _defconfig | sed 's/_defconfig//g' | sort))"
exit 1
fi
#######################################################################################################################
# Import common code and variables
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