From ea16af51b28d048c2daf2341ae9faacfbb06bba7 Mon Sep 17 00:00:00 2001 From: jll2 Date: Mon, 15 Jun 2009 18:08:26 -0700 Subject: [PATCH] Simplify handling of command-line verbose option: Previously, there was a $VERBOSE script variable that was set according to the "-v" command line option and then reset to null within each source sub-shell. With no loss of functionality, this patch removes all references to that variable. This makes the script 13 lines shorter. --- ccollect.sh | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index 3f2eda2..e93956d 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -153,7 +153,6 @@ no_sources=0 # WE="" ALL="" -VERBOSE="" NO_MORE_ARGS="" while [ "$#" -ge 1 ]; do eval arg=\"\$1\"; shift @@ -170,7 +169,7 @@ while [ "$#" -ge 1 ]; do ALL=1 ;; -v|--verbose) - VERBOSE=1 + set -x ;; -p|--parallel) PARALLEL=1 @@ -194,13 +193,6 @@ done # also export number of sources export no_sources -# -# be really, really, really verbose -# -if [ "${VERBOSE}" = 1 ]; then - set -x -fi - # # Look, if we should take ALL sources # @@ -307,11 +299,6 @@ while [ "${i}" -lt "${no_sources}" ]; do # begin_s=$(date +%s) - # - # unset possible options - # - VERBOSE="" - _techo "Beginning to backup" #