Bug 11509: (trivial rmaint followup) wrong parameter count
authorTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 10 Feb 2014 14:55:06 +0000 (11:55 -0300)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 10 Feb 2014 15:19:52 +0000 (15:19 +0000)
While adding the --help and -h switches I forgot to change to arguments
count validation so that one can actually use those parameters (i.e.
koha-create should accept being invoked with only one parameter).

This patch just changes the minimum parateres required from 2 to 1.

To reproduce:
- Run 'koha-create --help' from master
=> Usage information is printed BUT ALSO an "Error: wrong parameters"
   message
- Apply the patch and
- Run 'koha-create --help'
=> Usage informatio it printed and no error message.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
debian/scripts/koha-create

index c277f08..826163c 100755 (executable)
@@ -254,7 +254,7 @@ then
     . /etc/koha/koha-sites.conf
 fi
 
-[ $# -ge 2 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" )
+[ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" )
 
 TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser:,memcached-servers:,memcached-prefix:, \
      -n "$0" -- "$@"`