diff options
author | James Bottomley <JBottomley@Parallels.com> | 2014-07-24 17:03:32 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2020-12-06 11:37:10 -0800 |
commit | 4653a2018d75cc715757d20d5c1eda54a3db836f (patch) | |
tree | 0464ba404aa25ef849227a9d49fd1b2d268d9e40 | |
parent | 75be4bf6a801db800e45fdce3ef3b977f3c7913c (diff) | |
download | ricoh-sp100-4653a2018d75cc715757d20d5c1eda54a3db836f.tar.gz |
pstoricohddst-gdi: make DEBUG an environment variable
More useful than editing the script to get debugging. Also remove output dir
only if DEBUG != yes
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rwxr-xr-x | pstoricohddst-gdi | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pstoricohddst-gdi b/pstoricohddst-gdi index 9db3b13..1e10679 100755 --- a/pstoricohddst-gdi +++ b/pstoricohddst-gdi @@ -1,7 +1,7 @@ #!/bin/bash # Debug mode: change to 'yes' to enable -DEBUG=no +DEBUG=${DEBUG-no} function log() { [ "${DEBUG}" = "yes" ] && echo $* | logger -t "$0[$$]" @@ -177,6 +177,7 @@ mkdir -p $uid } -#rm -rf $uid; +# only remove the output dir if not debugging +[ ! "${DEBUG}" = "yes" ] && rm -rf $uid; exit 0 |