summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElan Ruusamäe2021-09-28 15:18:30 (GMT)
committerElan Ruusamäe2021-09-28 15:19:10 (GMT)
commitc31e256fba7700a7c2ca844e69fac0e728560b10 (patch)
tree11786f0d6659dad0148f15e1eae272eb9a0dbfb8
parent90e76664424afc0d67aa0171a0179c5b0ebf4bb3 (diff)
downloadcleanbuild-c31e256fba7700a7c2ca844e69fac0e728560b10.zip
cleanbuild-c31e256fba7700a7c2ca844e69fac0e728560b10.tar.gz
Enable keep container by default
-rwxr-xr-xbin/cleanbuild-docker.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/cleanbuild-docker.sh b/bin/cleanbuild-docker.sh
index 624a48f..30bba1e 100755
--- a/bin/cleanbuild-docker.sh
+++ b/bin/cleanbuild-docker.sh
@@ -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