From 54abc8e5f3b7212c512456e2856d5ad878e3faf5 Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Thu, 21 Jul 2011 17:32:09 +1200 Subject: [PATCH] Bug 6540 - [SIGNED-OFF] fix some command-line args issues Signed-off-by: Magnus Enger Signed-off-by: Chris Cormack (cherry picked from commit e7cf2223e06d9aea07f2dce6cd6481cbc2ae0d9d) Signed-off-by: Chris Nighswonger --- debian/scripts/koha-create | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index 5c742e1d5e..d039e94ca0 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -20,9 +20,10 @@ set -e usage="Usage: $0 [--create-db|--request-db|--populate-db] \ -[--marcflavor marc21|normarc|unimarc] \ -[--zebralang en|fr|nb] [--defaultsql /path/to/some.sql] -[--configfile /path/to/config] instancename" + [--marcflavor marc21|normarc|unimarc] \ + [--zebralang en|nb|fr] \ + [--defaultsql /path/to/some.sql] \ + [--configfile /path/to/config] instancename" die() { echo "$@" 1>&2 @@ -78,7 +79,7 @@ fi [ $# -ge 2 ] && [ $# -le 10 ] || die $usage -TEMP=`getopt -o crpm:l: -l create-db,request-db,populate-db,marcflavor:,zebralang:,configfile: \ +TEMP=`getopt -o crpm:l:d:f: -l create-db,request-db,populate-db,marcflavor:,zebralang:,defaultsql:,configfile: \ -n "$0" -- "$@"` # Note the quotes around `$TEMP': they are essential! @@ -99,7 +100,7 @@ while true ; do -d|--defaultsql) CLO_DEFAULTSQL="$2" ; shift 2 ;; -f|--configfile) configfile="$2" ; shift 2 ;; --) shift ; break ;; - *) die $usage ;; + *) die "Internal error processing command line arguments" ;; esac done -- 2.39.5