Merge pull request #3 from RPi-Distro/master
Ensure that the configuration file is an absolute path in Docker buil…
This commit is contained in:
commit
e13d7e91b5
|
@ -30,6 +30,9 @@ do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Ensure that the configuration file is an absolute path
|
||||||
|
CONFIG_FILE=$(realpath -s "$CONFIG_FILE")
|
||||||
|
|
||||||
# Ensure that the confguration file is present
|
# Ensure that the confguration file is present
|
||||||
if test -z "${CONFIG_FILE}"; then
|
if test -z "${CONFIG_FILE}"; then
|
||||||
echo "Configuration file need to be present in '${DIR}/config' or path passed as parameter"
|
echo "Configuration file need to be present in '${DIR}/config' or path passed as parameter"
|
||||||
|
@ -63,7 +66,7 @@ if [ "${CONTAINER_EXISTS}" != "" ] && [ "${CONTINUE}" != "1" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Modify original build-options to allow config file to be mounted in the docker container
|
# Modify original build-options to allow config file to be mounted in the docker container
|
||||||
BUILD_OPTS="$(echo ${BUILD_OPTS:-} | sed -E 's@\-c\s?([^ ]+)@-c /config@')"
|
BUILD_OPTS="$(echo "${BUILD_OPTS:-}" | sed -E 's@\-c\s?([^ ]+)@-c /config@')"
|
||||||
|
|
||||||
${DOCKER} build -t pi-gen "${DIR}"
|
${DOCKER} build -t pi-gen "${DIR}"
|
||||||
if [ "${CONTAINER_EXISTS}" != "" ]; then
|
if [ "${CONTAINER_EXISTS}" != "" ]; then
|
||||||
|
@ -73,7 +76,7 @@ if [ "${CONTAINER_EXISTS}" != "" ]; then
|
||||||
--volumes-from="${CONTAINER_NAME}" --name "${CONTAINER_NAME}_cont" \
|
--volumes-from="${CONTAINER_NAME}" --name "${CONTAINER_NAME}_cont" \
|
||||||
pi-gen \
|
pi-gen \
|
||||||
bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static &&
|
bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static &&
|
||||||
cd /pi-gen; ./build.sh ${BUILD_OPTS} ;
|
cd /pi-gen; ./build.sh ${BUILD_OPTS} &&
|
||||||
rsync -av work/*/build.log deploy/" &
|
rsync -av work/*/build.log deploy/" &
|
||||||
wait "$!"
|
wait "$!"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user