diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2017-12-28 21:32:10 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2017-12-28 21:32:10 -0800 |
commit | 5d73c6b04ae06319ba5cc7bed9902249284494a1 (patch) | |
tree | 1237257def6c9953ad79f29e3fac019f2da572ee /tools/catalyst-auto | |
parent | tools: fix typo of DEST_HARDEND (diff) | |
download | releng-5d73c6b04ae06319ba5cc7bed9902249284494a1.tar.gz releng-5d73c6b04ae06319ba5cc7bed9902249284494a1.tar.bz2 releng-5d73c6b04ae06319ba5cc7bed9902249284494a1.zip |
catalyst-auto: add intermediate verbose, that prints the command, but not the output; -vv has old behavior
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'tools/catalyst-auto')
-rwxr-xr-x | tools/catalyst-auto | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/catalyst-auto b/tools/catalyst-auto index cd26f969..02115d1c 100755 --- a/tools/catalyst-auto +++ b/tools/catalyst-auto @@ -77,9 +77,12 @@ run_cmd() { local logfile="$1" shift - if [ $verbose = 1 ]; then + if [ $verbose = 2 ]; then echo "*** Running command: $*" "$@" 2>&1 | tee -a "${logfile}" + elif [ $verbose = 1 ]; then + echo "*** Running command: $*" + "$@" &>> "${logfile}" else "$@" &>> "${logfile}" fi @@ -137,7 +140,7 @@ do shift ;; -v|--verbose) - verbose=1 + verbose=$(($verbose+1)) ;; -k|--keep-tmpdir) keep_tmpdir=1 @@ -224,7 +227,7 @@ if [[ ${preclean} -eq 1 ]]; then mkdir "${TMPDIR}" fi -if [ ${verbose} = 1 ]; then +if [ ${verbose} -ge 1 ]; then echo "TMPDIR = ${TMPDIR}" echo "DATESTAMP = ${DATESTAMP}" echo "TIMESTAMP = ${TIMESTAMP}" |