diff options
author | tv <tv@nomic.retiolum> | 2013-11-12 15:33:15 +0100 |
---|---|---|
committer | tv <tv@nomic.retiolum> | 2013-11-12 15:33:15 +0100 |
commit | a6012ff33c05593f4c73b7de55ce09915b6327f9 (patch) | |
tree | b77d38f035ceae4b091c00bd5b2dd93253fe10f5 | |
parent | 0dcb4ddd2e1dd53ce03a3216c71b17554732e6ab (diff) |
ship build: add is_debug_mode
-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 } |