]> git.pld-linux.org Git - projects/cleanbuild.git/commitdiff
Enable keep container by default
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 28 Sep 2021 15:18:30 +0000 (18:18 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Tue, 28 Sep 2021 15:19:10 +0000 (18:19 +0300)
bin/cleanbuild-docker.sh

index 624a48f97b4a3f9b221713c0d39f68a8c14285e1..30bba1e89253dea6c871e21a07ccddba4621afe1 100755 (executable)
@@ -9,7 +9,7 @@ PROGRAM=${0##*/}
 : ${TRACING=false}
 : ${WITH=}
 : ${WITHOUT=}
-: ${KEEP_CONTAINER=false}
+: ${KEEP_CONTAINER=true}
 : ${TMPFS="4G"}
 
 dir=$(pwd)
@@ -169,7 +169,7 @@ package_build() {
 
 parse_options() {
        local t
-       t=$(getopt -o 'x' --long 'network,no-tmpfs,notmpfs,tmpfs:,keep-container,with:,without:' -n "$PROGRAM" -- "$@")
+       t=$(getopt -o 'x' --long 'network,no-tmpfs,notmpfs,tmpfs:,keep-container:,with:,without:' -n "$PROGRAM" -- "$@")
        [ $? != 0 ] && exit $?
        eval set -- "$t"
 
@@ -189,7 +189,9 @@ parse_options() {
                        TMPFS="$1"
                        ;;
                --keep-container)
-                       KEEP_CONTAINER=true
+                       shift
+                       [ "$1" = "true" -o "$1" = "false" ] || die "Invalid boolean value: $1"
+                       KEEP_CONTAINER=$1
                        ;;
                --with)
                        shift
This page took 0.15476 seconds and 4 git commands to generate.