1
0
mirror of https://github.com/stucki/docker-lineageos synced 2024-12-19 17:12:29 -05:00

run.sh: Add FORCE_BUILD flag

This commit is contained in:
Michael Stucki 2014-12-22 18:38:37 +01:00
parent 92fa90f7f5
commit 92628eaa2c

3
run.sh
View File

@ -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