Browse Source

Make nicer arg processor

Alois Mahdal 10 years ago
parent
commit
7f4d8873d1
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      bin/saturnin-push

+ 5
- 5
bin/saturnin-push View File

@@ -12,11 +12,11 @@ usage() {
12 12
 }
13 13
 
14 14
 while true; do case $1 in
15
-    -o|--order)     ORDER=$2;           shift 2;    ;;
16
-    --help)         usage;                          ;;
17
-    "")             break                           ;;
18
-    -*)             usage;                          ;;
19
-    *)              hosts="$1"; shift;              ;;
15
+    -o|--order)     ORDER=$2; shift 2 ;;
16
+    --help)         usage             ;;
17
+    -*)             usage             ;;
18
+    "")             break             ;;
19
+    *)              hosts="$1"; shift ;;
20 20
 esac done
21 21
 
22 22
 test -n "$hosts" || hosts=$(saturnin-ini -s push.hosts | debug_pipe ini_hosts)