Bug 18548: Print usage when missing instance name in koha-create script
authorJosef Moravec <josef.moravec@gmail.com>
Fri, 5 May 2017 10:23:23 +0000 (10:23 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Sat, 20 May 2017 14:05:35 +0000 (14:05 +0000)
Test plan:
1. Run: debian/scripts/koha-create --request-db
-> Without patch you see the getent error message
-> With patch you see usage and "Missing instance name" message

Signed-off-by: Dilan Johnpulle <dilan@calyx.net.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
debian/scripts/koha-create

index b21e472..ba4f043 100755 (executable)
@@ -550,6 +550,8 @@ fi
 
 set_authorities_indexing_mode $AUTHORITIES_INDEXING_MODE $ZEBRA_MARC_FORMAT
 
 
 set_authorities_indexing_mode $AUTHORITIES_INDEXING_MODE $ZEBRA_MARC_FORMAT
 
+[ $# -ge 1 ] || ( usage ; die "Missing instance name..." )
+
 name="$1"
 
 set_upload_path $name
 name="$1"
 
 set_upload_path $name