forked from cschol/vcv-plugin-builder-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·45 lines (37 loc) · 996 Bytes
/
build.sh
File metadata and controls
executable file
·45 lines (37 loc) · 996 Bytes
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
#
# VCV Plugin Builder Linux
#
# Author: cschol, Mar 2018
#
set -e
docker version &> /dev/null
if [ $? -eq 1 ]; then
echo "ERROR: Docker is required to run this script!"
echo "Visit https://docs.docker.com/install/ for more information."
exit 1
fi
# Location of Rack source code.
if [ -z ${RACK_DIR} ]; then
echo "ERROR: Environment variable RACK_DIR not defined"
exit 1
fi
# Location of Plugin source code.
if [ -z ${WORKING_DIR} ]; then
echo "ERROR: Environment variable WORKING_DIR not defined"
exit 1
fi
DOCKER_IMAGE_NAME=vcv-plugin-builder-linux
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
docker build -t ${DOCKER_IMAGE_NAME} ${SCRIPT_DIR}
docker run \
--rm \
-e RACK_DIR=/opt/Rack \
-v ${RACK_DIR}:/opt/Rack:ro \
-v ${WORKING_DIR}:/opt/workspace \
-w /opt/workspace \
--entrypoint "make" \
--entrypoint "/bin/bash" \
${DOCKER_IMAGE_NAME} \
-c "make clean && make dist -j$(nproc --all)"
exit 0