Browse Source

Compact eeln argument processing code

Alois Mahdal 10 years ago
parent
commit
e0a0742c88
1 changed files with 8 additions and 29 deletions
  1. 8
    29
      bin/eeln.in

+ 8
- 29
bin/eeln.in View File

@@ -46,35 +46,14 @@ load() {
46 46
     iniread -p ln.dir.$1 | expand_tilde | debug_pipe out
47 47
 }
48 48
 
49
-while true;
50
-do
51
-    case $1 in
52
-        -d|--debug)
53
-            FFOO_DEBUG=true
54
-            shift
55
-            ;;
56
-        -f|--force)
57
-            FORCE=true
58
-            shift
59
-            ;;
60
-        -v|--verbose)
61
-            FFOO_VERBOSE=true
62
-            shift
63
-            ;;
64
-        -t|--target)
65
-            target=$2
66
-            shift 2
67
-            ;;
68
-        "")
69
-            usage
70
-            ;;
71
-        *)
72
-            src=$1
73
-            name=$2
74
-            break
75
-            ;;
76
-    esac
77
-done
49
+while true; do case $1 in
50
+    -d|--debug)         FFOO_DEBUG=true;    shift   ;;
51
+    -f|--force)         FORCE=true;         shift   ;;
52
+    -v|--verbose)       FFOO_VERBOSE=true;  shift   ;;
53
+    -t|--target)        target=$2           shift 2 ;;
54
+    "")                 usage                       ;;
55
+    *)                  src=$1; name=$2;    break   ;;
56
+esac done
78 57
 
79 58
 test -z "$target"               && target=$(load target)
80 59
 test -z "$prefix"               && prefix=$(load prefix)