]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
fixed script
authorRazvan Becheriu <ravan@isc.org>
Thu, 7 Mar 2019 05:12:11 +0000 (07:12 +0200)
committerRazvan Becheriu <ravan@isc.org>
Thu, 7 Mar 2019 05:12:11 +0000 (07:12 +0200)
tools/sysrepo_config

index 7f462c2b553d3714ce6c7fb4713f9323085c6732..83215e1e4e4faafa1f4a908ad885e41770d4498a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Copyright (C) 2018-2019 Internet Systems Consortium, Inc. ("ISC")
 #
@@ -12,8 +12,7 @@
 
 sysrepo_lib="libsysrepo"
 
-if [ -z "${YANG_LIBRARY_PATH}" ]
-then
+if [ -z "${YANG_LIBRARY_PATH}" ]; then
     YANG_LIBRARY_PATH=/
 fi
 
@@ -33,13 +32,12 @@ fi
 # shellcheck disable=SC1090
 source "${DIR}/sysrepo_config_defines.sh"
 
-if [ $# -ne 1 ] && [ $# -ne 2 ]
-then
-       echo "run: \`$0 --help\` for more help1"
-       exit 0
+if [ $# -ne 1 ] && [ $# -ne 2 ]; then
+    echo "run: \`$0 --help\` for more help"
+    exit 0
 fi
-if [ "$1" == "--help" ]
-then
+
+if [ "$1" = "--help" ]; then
     echo "sysrepo_config 'option' ['library']"
     echo "options:"
     echo "--help"
@@ -62,7 +60,7 @@ fi
 
 if [ $# -ne 2 ]; then
     echo "Incorrect number of parameters specified"
-    echo "run: \`$0 --help\` for more help2"
+    echo "run: \`$0 --help\` for more help"
     exit 0
 elif [ "$2" != "libsysrepo" ] && [ "$2" != "libSysrepo-cpp" ]; then
     echo "library $2 not supported"
@@ -87,7 +85,7 @@ if [ "$1" = "--libs" ]; then
     exit 0
 fi
 
-if [ "$1" == "--modversion" ]; then
+if [ "$1" = "--modversion" ]; then
     MAJOR="1"
     MINOR="0"
     PATCH="0"
@@ -95,10 +93,12 @@ if [ "$1" == "--modversion" ]; then
     exit 0
 fi
 
-if [ "$1" == "--variable=SR_REPOSITORY_LOC" ]; then
+if [ "$1" = "--variable=SR_REPOSITORY_LOC" ]; then
     echo "${SYSREPO_PATH}/build/repository"
     exit 0
 fi
 
 echo "wrong parameter"
 echo "run: \`$0 --help\` for more help"
+
+exit 1