summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xship/build9
1 files changed, 7 insertions, 2 deletions
diff --git a/ship/build b/ship/build
index 62be4e8f..5dc55801 100755
--- a/ship/build
+++ b/ship/build
@@ -137,12 +137,17 @@ setf() {
eval "$1=$value_script"
- if test "${debug-false}" = true; then
+ if is_debug_mode; then
eval 'echo "$1=\"$value_script\""'
eval 'echo "'"\$$1"'"' | nl -b a
fi >&2
}
+## usage: is_debug_mode
+is_debug_mode() {
+ test "${debug-false}" = true
+}
+
###
### buildcache utilities
###
@@ -155,7 +160,7 @@ buildcache_initialize() {
## usage: buildcache_finalize
buildcache_finalize() {
- if test "${debug-false}" != true; then
+ if is_debug_mode; then
rm "$buildcache"
fi
}