From 92628eaa2c8dcb376a643b4cd300cb42d4429046 Mon Sep 17 00:00:00 2001 From: Michael Stucki Date: Mon, 22 Dec 2014 18:38:37 +0100 Subject: [PATCH] run.sh: Add FORCE_BUILD flag --- run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 94e571b..f6dfbdc 100755 --- a/run.sh +++ b/run.sh @@ -7,6 +7,7 @@ CCACHE=$(pwd)/ccache CONTAINER_HOME=/home/cmbuild CONTAINER=cyanogenmod REPOSITORY=stucki/cyanogenmod +FORCE_BUILD=0 # Create shared folders mkdir -p $SOURCE @@ -17,7 +18,7 @@ IMAGE_EXISTS=$(docker images -q $REPOSITORY) if [ $? -ne 0 ]; then echo "docker command not found" exit $? -elif [[ -z $IMAGE_EXISTS ]]; then +elif [[ -z $IMAGE_EXISTS ]] || [[ $FORCE_BUILD = 1 ]]; then echo "Building Docker image $REPOSITORY..." docker build --no-cache --rm -t $REPOSITORY . fi