Do not assume that build-docker.sh is run from the repository root directory

This commit is contained in:
Samuele Maci 2019-07-01 21:04:27 +02:00
parent cdfa19ce49
commit 7f4c12ab9b

View File

@ -1,4 +1,5 @@
#!/bin/bash -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
BUILD_OPTS="$*"
@ -61,7 +62,7 @@ if [ "${CONTAINER_EXISTS}" != "" ] && [ "${CONTINUE}" != "1" ]; then
exit 1
fi
${DOCKER} build -t pi-gen .
${DOCKER} build -t pi-gen "${DIR}"
if [ "${CONTAINER_EXISTS}" != "" ]; then
trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${CONTAINER_NAME}_cont' SIGINT SIGTERM
time ${DOCKER} run --rm --privileged \