From 109a37e4a4f1f63dc0c0fc1513563efdd6691027 Mon Sep 17 00:00:00 2001
From: Josef Moravec <josef.moravec@gmail.com>
Date: Fri, 5 May 2017 10:23:23 +0000
Subject: [PATCH] Bug 18548: Print usage when missing instance name in
 koha-create script

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>
---
 debian/scripts/koha-create | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create
index b21e472a60..ba4f0430ec 100755
--- a/debian/scripts/koha-create
+++ b/debian/scripts/koha-create
@@ -550,6 +550,8 @@ fi
 
 set_authorities_indexing_mode $AUTHORITIES_INDEXING_MODE $ZEBRA_MARC_FORMAT
 
+[ $# -ge 1 ] || ( usage ; die "Missing instance name..." )
+
 name="$1"
 
 set_upload_path $name
-- 
2.11.0