diff options
-rwxr-xr-x | ship/build | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -137,12 +137,17 @@ setf() { eval "$1=$value_script" - if test "${debug-false}" = true; then + if is_debug_mode; then eval 'echo "[35m$1=\"$value_script\"[m"' 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 } |