diff options
author | Jean Delvare <jdelvare@suse.de> | 2012-02-01 18:08:49 +0100 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2012-02-01 18:08:49 +0100 |
commit | 10232a5ec32c942de37c144a88c15d22260522ef (patch) | |
tree | 96b396a85a6f8226b53b1cb721394eec9215425f | |
parent | 2298aa5cd85ee3dd9888e381911077b2c3c24759 (diff) | |
download | quilt-10232a5ec32c942de37c144a88c15d22260522ef.tar.gz |
backup-files: Drop variable progname
The program name $0 is a global variable, there is no point in
passing it to functions as a parameter.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Raphael Hertzog <hertzog@debian.org>
-rw-r--r-- | quilt/scripts/backup-files.in | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/quilt/scripts/backup-files.in b/quilt/scripts/backup-files.in index 1bf508b..5d31c9f 100644 --- a/quilt/scripts/backup-files.in +++ b/quilt/scripts/backup-files.in @@ -27,8 +27,7 @@ set -e # name prefix for the backup files must be specified with the -B option. usage () { - local progname="$1" - echo "Usage: $progname [-B prefix] [-f {file|-}] [-s] [-k] [-t] [-L] [-b|-r|-x] {file|-} ... + echo "Usage: $0 [-B prefix] [-f {file|-}] [-s] [-k] [-t] [-L] [-b|-r|-x] {file|-} ... Create hard linked backup copies of a list of files read from standard input. @@ -172,7 +171,6 @@ walk() { ECHO=echo declare -a FILELIST -progname="$0" while [ $# -gt 0 ]; do case $1 in -b) OPT_WHAT=backup @@ -195,7 +193,7 @@ while [ $# -gt 0 ]; do ;; -t) OPT_TOUCH=1 ;; - -?*) usage "$progname" + -?*) usage exit 0 ;; *) FILELIST=("$@") @@ -207,7 +205,7 @@ while [ $# -gt 0 ]; do done if [ -z "$OPT_PREFIX" ]; then - usage "$progname" + usage exit 1 fi |