summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2013-11-12 15:33:15 +0100
committertv <tv@nomic.retiolum>2013-11-12 15:33:15 +0100
commita6012ff33c05593f4c73b7de55ce09915b6327f9 (patch)
treeb77d38f035ceae4b091c00bd5b2dd93253fe10f5
parent0dcb4ddd2e1dd53ce03a3216c71b17554732e6ab (diff)
ship build: add is_debug_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
}