Bug 16749: Use is_instance to make sure the dev instance exist
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 16 Feb 2017 12:57:17 +0000 (12:57 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 17 Feb 2017 13:20:58 +0000 (13:20 +0000)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

debian/scripts/koha-translate

index 2d72c6e..91f59e9 100755 (executable)
@@ -202,10 +202,10 @@ set_action()
 
 set_dev()
 {
-    if echo $1 | egrep -q "^[^-]"; then
+    if is_instance $1; then
         dev=$1
     else
-        die "Error: dev parameter with wrong instance name"
+        die "Error: Invalid instance name $1"
     fi
 }