]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
correctly look for --repo_host= and --repo_path=
authorMark Andrews <marka@isc.org>
Mon, 17 Sep 2018 05:37:22 +0000 (15:37 +1000)
committerMark Andrews <marka@isc.org>
Mon, 17 Sep 2018 05:37:22 +0000 (15:37 +1000)
util/bind.sh

index b813044afd59325aedb4687af55bc01127d125bd..39f9337c89b870520a9e26e6c200f2c166469eaa 100644 (file)
@@ -34,16 +34,22 @@ binddir=$topdir/bind
 repo_host="gitlab.isc.org"
 repo_path="isc-projects/bind9"
 
-case "${1:-}" in
---repo_host=*)
-        repo_host="${1}";
-        shift
-        ;;
---repo_path=*)
-        repo_path="${1}";
-        shift
-        ;;
-esac
+while :
+do
+       case "${1:-}" in
+       --repo_host=*)
+               repo_host="${1}";
+               shift
+               continue
+               ;;
+       --repo_path=*)
+               repo_path="${1}";
+               shift
+               continue
+               ;;
+       esac
+       break;
+done
 
 case $# in 
     1)
@@ -104,7 +110,7 @@ case $# in
           ;;
        esac
        ;;
-    *) echo "usage: sh bind.sh [--repo_host=<host>] [--repo_path=<project path>] [<branch>|<version>]" >&2
+    *) echo "usage: sh bind.sh [--repo_host=<host>] [--repo_path=<project path>] ( <branch>|<version> )" >&2
        exit 1
        ;;
 esac