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.
This commit is contained in:
jll2 2009-06-15 18:08:26 -07:00 committed by Nico Schottelius
parent a4c61e7b68
commit ea16af51b2
1 changed files with 1 additions and 14 deletions

View File

@ -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"
#