From e7fd7b00b848ef6827b7e08d91f7be27ca025002 Mon Sep 17 00:00:00 2001 From: Olivier DOSSMANN Date: Sat, 4 Aug 2018 23:12:01 +0200 Subject: [PATCH] FIX - Force Alpine directory creation in case we're in Gitlab CI --- .gitlab-ci.yml | 3 ++- install-and-chroot.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 861d08a..571e372 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,4 +8,5 @@ build: script: - apt-get update && apt-get install -y wget sudo - MOUNTBIN=`which mount` && rm -f $MOUNTBIN && ln -sf `which echo` $MOUNTBIN - - bash install-and-chroot.sh + - mkdir /alpine && cp build /alpine/ + - FORCE_EXEC=1 bash install-and-chroot.sh diff --git a/install-and-chroot.sh b/install-and-chroot.sh index 415c536..d66b9bd 100755 --- a/install-and-chroot.sh +++ b/install-and-chroot.sh @@ -5,6 +5,7 @@ DIR=${DIRPATH:-'/alpine'} script_url="https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install" script_version="v0.9.0" script_name="alpine-chroot-install" +FORCE_EXEC=${FORCE_EXEC:-0} # Tests if ! [[ $DIR == /* ]]; then @@ -20,7 +21,7 @@ if ! test -f "$SCRIPT"; then fi # Install Alpine -if ! test -d "$DIR"; then +if ! test -d "$DIR" || ! [[ "$FORCE_EXEC" == 0 ]]; then sudo bash ./$SCRIPT -d $DIR -m http://ftp.halifax.rwth-aachen.de/alpine \ -p abuild \ -p bash \