Browse Source

Let iniread guess filename where possible

Alois Mahdal 10 years ago
parent
commit
27638a21fc
6 changed files with 15 additions and 15 deletions
  1. 1
    1
      bin/eeget.in
  2. 6
    6
      bin/eeiam.in
  3. 1
    1
      bin/eeln.in
  4. 4
    4
      bin/eepush.in
  5. 2
    2
      bin/eerevert.in
  6. 1
    1
      bin/eewww.in

+ 1
- 1
bin/eeget.in View File

@@ -21,7 +21,7 @@ while true; do case $1 in
21 21
     *)              nvrlist=$1;         shift;   break  ;;
22 22
 esac done
23 23
 
24
-test -n "$brewroot" || brewroot=$(iniread -p get.brewroot get.ini)
24
+test -n "$brewroot" || brewroot=$(iniread -p get.brewroot)
25 25
 test -n "$brewroot" || die "specify '-b /path/to/brewroot or get.brewroot in get.ini"
26 26
 test -d "$brewroot" || die "cannot access brewroot: $brewroot"
27 27
 

+ 6
- 6
bin/eeiam.in View File

@@ -42,17 +42,17 @@ familiars_at() {
42 42
     # daemons specific to $1 location plus the rest
43 43
     #
44 44
     test -n "$1" || usagef "location"
45
-    iniread -p iam.running.at.$1 iam.ini
46
-    iniread -p iam.running.at.ANYPLACE iam.ini
45
+    iniread -p iam.running.at.$1
46
+    iniread -p iam.running.at.ANYPLACE
47 47
 }
48 48
 
49 49
 where_i_am() {
50 50
     #
51 51
     # what is my physical location?
52 52
     #
53
-    if=$(iniread -p iam.using.if iam.ini)
53
+    if=$(iniread -p iam.using.if)
54 54
     gwmac=$(arp | grep "^gateway\\>.*\\<$if\$" | tr ' ' '\n' | grep :)
55
-    iniread -p iam.seeing.gw.$gwmac iam.ini || echo OUT
55
+    iniread -p iam.seeing.gw.$gwmac || echo OUT
56 56
 }
57 57
 
58 58
 start_familiar() {
@@ -61,7 +61,7 @@ start_familiar() {
61 61
     #
62 62
     local f=$1
63 63
     pids_matching $f && return 0
64
-    local like=$(iniread -p iam.starting.like.this.$f iam.ini)
64
+    local like=$(iniread -p iam.starting.like.this.$f)
65 65
     debug -v f like
66 66
     if test -n  "$like";
67 67
         then
@@ -75,7 +75,7 @@ set_status() {
75 75
     # set public status $1 by command in ini file
76 76
     #
77 77
     local what=$1
78
-    iniread -p iam.saying.like.this.$what iam.ini | bash
78
+    iniread -p iam.saying.like.this.$what | bash
79 79
 }
80 80
 
81 81
 

+ 1
- 1
bin/eeln.in View File

@@ -47,7 +47,7 @@ link() {
47 47
 }
48 48
 
49 49
 load() {
50
-    iniread -p ln.dir.$1 ln.ini | expand_tilde | debug_pipe out
50
+    iniread -p ln.dir.$1 | expand_tilde | debug_pipe out
51 51
 }
52 52
 
53 53
 while true;

+ 4
- 4
bin/eepush.in View File

@@ -7,7 +7,7 @@ ffoo import core
7 7
 ffoo import ini
8 8
 ffoo import recon
9 9
 
10
-ORDER="$(iniread -p push.options.order push.ini)"
10
+ORDER="$(iniread -p push.options.order)"
11 11
 
12 12
 while true; do case $1 in
13 13
     -d|--debug)     FFOO_DEBUG=true;    shift;      ;;
@@ -19,11 +19,11 @@ while true; do case $1 in
19 19
     *)              hosts="$1"; shift;              ;;
20 20
 esac done
21 21
 
22
-test -n "$hosts" || hosts=$(iniread -s push.hosts push.ini | debug_pipe ini_hosts)
22
+test -n "$hosts" || hosts=$(iniread -s push.hosts | debug_pipe ini_hosts)
23 23
 debug -v hosts
24 24
 
25 25
 test -n "$hosts" || die "no valid hosts to begin with"
26
-paths=$(iniread -s push.paths push.ini)
26
+paths=$(iniread -s push.paths)
27 27
 test -n "$paths" || die "no valid paths to begin with"
28 28
 
29 29
 think "Probing & sorting paths"
@@ -81,7 +81,7 @@ esac
81 81
 
82 82
 for host in $hosts;
83 83
 do
84
-    iniread -s push.commands push.ini \
84
+    iniread -s push.commands \
85 85
       | grep . \
86 86
       | while read cmd;
87 87
         do

+ 2
- 2
bin/eerevert.in View File

@@ -54,11 +54,11 @@ snapshot="$2"
54 54
 
55 55
 test -z "$snapshot" && {
56 56
     think "looking for $domain in revert.ini"
57
-    snapshot=$(iniread -1 -p revert.to.snapshot.$domain revert.ini)
57
+    snapshot=$(iniread -1 -p revert.to.snapshot.$domain)
58 58
 }
59 59
 test -z "$snapshot" && {
60 60
     think "looking for default snapshot name in revert.ini"
61
-    snapshot=$(iniread -1 -p revert.to.snapshot._default_ revert.ini)
61
+    snapshot=$(iniread -1 -p revert.to.snapshot._default_)
62 62
 }
63 63
 test -z "$snapshot" && {
64 64
     die "could not determine snapshot for $domain"

+ 1
- 1
bin/eewww.in View File

@@ -11,7 +11,7 @@ debug "\$*=$*"
11 11
 
12 12
 test -z "$uri" && uri="$(echo "$*" | find_uri)"
13 13
 test -z "$uri" && uri="$(clipln | find_uri)"
14
-test -z "$uri" && uri="$(iniread -p www.bookmark.default www.ini)"
14
+test -z "$uri" && uri="$(iniread -p www.bookmark.default)"
15 15
 #test -z "$uri" && uri="http://www.example.com/"
16 16
 
17 17
 echo $uri