Ver código fonte

Use eeini instead of ini.iniread directly

Avoids need to replace __EECC_INI__PATH
Alois Mahdal 10 anos atrás
pai
commit
6a8ddec5a0
7 arquivos alterados com 22 adições e 35 exclusões
  1. 5
    8
      bin/eedmenu.in
  2. 1
    2
      bin/eeget.in
  3. 9
    11
      bin/eeiam.in
  4. 1
    3
      bin/eeln.in
  5. 4
    6
      bin/eepush.in
  6. 2
    4
      bin/eerevert.in
  7. 0
    1
      bin/eewatch.in

+ 5
- 8
bin/eedmenu.in Ver arquivo

@@ -2,9 +2,6 @@
2 2
 
3 3
 . <(ffoom init)
4 4
 ffoo import core
5
-ffoo import ini
6
-
7
-FFOO_INI_PATH="__EECC_INI_PATH__"
8 5
 
9 6
 usage() {
10 7
     usage_is "[-l|--lines NUM] [--split CHAR] ARGS..."
@@ -23,11 +20,11 @@ esac done
23 20
 
24 21
 test -n "$delim"        && maybe_split=do_split
25 22
 
26
-nb="$(iniread -p style.color.nbg)"
27
-nf="$(iniread -p style.color.nfg)"
28
-sb="$(iniread -p style.color.sbg)"
29
-sf="$(iniread -p style.color.sfg)"
30
-fn="$(iniread -p style.font)"
23
+nb="$(eeini -p style.color.nbg)"
24
+nf="$(eeini -p style.color.nfg)"
25
+sb="$(eeini -p style.color.sbg)"
26
+sf="$(eeini -p style.color.sfg)"
27
+fn="$(eeini -p style.font)"
31 28
 fn=${fn:--*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*}
32 29
 
33 30
 debug -v nb nf sb sf fn

+ 1
- 2
bin/eeget.in Ver arquivo

@@ -1,7 +1,6 @@
1 1
 #!/bin/bash
2 2
 
3 3
 . <(ffoom init)
4
-FFOO_INI_PATH="__EECC_INI_PATH__"
5 4
 
6 5
 ffoo import core
7 6
 ffoo import ini
@@ -21,7 +20,7 @@ while true; do case $1 in
21 20
     *)              nvrlist=$1;         shift;   break  ;;
22 21
 esac done
23 22
 
24
-test -n "$brewroot" || brewroot=$(iniread -p get.brewroot)
23
+test -n "$brewroot" || brewroot=$(eeini -p get.brewroot)
25 24
 test -n "$brewroot" || die "specify '-b /path/to/brewroot or get.brewroot in get.ini"
26 25
 test -d "$brewroot" || die "cannot access brewroot: $brewroot"
27 26
 

+ 9
- 11
bin/eeiam.in Ver arquivo

@@ -1,10 +1,8 @@
1 1
 #!/bin/bash
2 2
 
3 3
 . <(ffoom init)
4
-FFOO_INI_PATH="__EECC_INI_PATH__"
5 4
 
6 5
 ffoo import core
7
-ffoo import ini
8 6
 ffoo import recon
9 7
 
10 8
 
@@ -47,17 +45,17 @@ familiars_at() {
47 45
     # daemons specific to $1 location plus the rest
48 46
     #
49 47
     test -n "$1" || usagef "location"
50
-    iniread -p iam.running.at.$1
51
-    iniread -p iam.running.at.ANYPLACE
48
+    eeini -p iam.running.at.$1
49
+    eeini -p iam.running.at.ANYPLACE
52 50
 }
53 51
 
54 52
 where_i_am() {
55 53
     #
56 54
     # what is my physical location?
57 55
     #
58
-    if=$(iniread -p iam.using.if)
56
+    if=$(eeini -p iam.using.if)
59 57
     gwmac=$(arp | grep "^gateway\\>.*\\<$if\$" | tr ' ' '\n' | grep :)
60
-    iniread -p iam.seeing.gw.$gwmac || echo OUT
58
+    eeini -p iam.seeing.gw.$gwmac || echo OUT
61 59
 }
62 60
 
63 61
 start_familiar() {
@@ -66,7 +64,7 @@ start_familiar() {
66 64
     #
67 65
     local f=$1
68 66
     pids_matching $f && return 0
69
-    local like=$(iniread -p iam.starting.like.this.$f)
67
+    local like=$(eeini -p iam.starting.like.this.$f)
70 68
     debug -v f like
71 69
     if test -n  "$like";
72 70
         then
@@ -80,7 +78,7 @@ set_status() {
80 78
     # set public status $1 by command in ini file
81 79
     #
82 80
     local what=$1
83
-    iniread -p iam.saying.like.this.$what | bash
81
+    eeini -p iam.saying.like.this.$what | bash
84 82
 }
85 83
 
86 84
 sound_is_muted() {
@@ -138,8 +136,8 @@ i_am_bbl() {
138 136
     # changing language
139 137
     #
140 138
     local cur=$(setxkbmap -v | grep '^symbols: ' | cut -d+ -f2)
141
-    local all="$(iniread    -p iam.typing.lang)"
142
-    local def="$(iniread -1 -p iam.typing.lang)"
139
+    local all="$(eeini    -p iam.typing.lang)"
140
+    local def="$(eeini -1 -p iam.typing.lang)"
143 141
     local nxt=$(
144 142
         echo -e "$all\n$all" \
145 143
           | grep -m 1 -A 1 $cur \
@@ -155,7 +153,7 @@ i_am_bbldone() {
155 153
     #
156 154
     # changing language back to normal
157 155
     #
158
-    setxkbmap "$(iniread -1 -p iam.typing.lang)"
156
+    setxkbmap "$(eeini -1 -p iam.typing.lang)"
159 157
 }
160 158
 
161 159
 i_am_deaf() {

+ 1
- 3
bin/eeln.in Ver arquivo

@@ -1,10 +1,8 @@
1 1
 #!/bin/bash
2 2
 
3 3
 . <(ffoom init)
4
-FFOO_INI_PATH="__EECC_INI_PATH__"
5 4
 
6 5
 ffoo import core
7
-ffoo import ini
8 6
 
9 7
 DEFAULT_TARGET=$HOME
10 8
 TRY_RELPATH=true
@@ -43,7 +41,7 @@ link() {
43 41
 }
44 42
 
45 43
 load() {
46
-    iniread -p ln.dir.$1 | expand_tilde | debug_pipe out
44
+    eeini -p ln.dir.$1 | expand_tilde | debug_pipe out
47 45
 }
48 46
 
49 47
 while true; do case $1 in

+ 4
- 6
bin/eepush.in Ver arquivo

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

+ 2
- 4
bin/eerevert.in Ver arquivo

@@ -1,10 +1,8 @@
1 1
 #!/bin/bash
2 2
 
3 3
 . <(ffoom init)
4
-FFOO_INI_PATH="__EECC_INI_PATH__"
5 4
 
6 5
 ffoo import core
7
-ffoo import ini
8 6
 ffoo import recon
9 7
 
10 8
 usage() {
@@ -54,11 +52,11 @@ snapshot="$2"
54 52
 
55 53
 test -z "$snapshot" && {
56 54
     think "looking for $domain in revert.ini"
57
-    snapshot=$(iniread -1 -p revert.to.snapshot.$domain)
55
+    snapshot=$(eeini -1 -p revert.to.snapshot.$domain)
58 56
 }
59 57
 test -z "$snapshot" && {
60 58
     think "looking for default snapshot name in revert.ini"
61
-    snapshot=$(iniread -1 -p revert.to.snapshot._default_)
59
+    snapshot=$(eeini -1 -p revert.to.snapshot._default_)
62 60
 }
63 61
 test -z "$snapshot" && {
64 62
     die "could not determine snapshot for $domain"

+ 0
- 1
bin/eewatch.in Ver arquivo

@@ -1,7 +1,6 @@
1 1
 #!/bin/bash
2 2
 
3 3
 . <(ffoom init)
4
-FFOO_INI_PATH="__EECC_INI_PATH__"
5 4
 
6 5
 ffoo import core
7 6
 ffoo import recon