Browse Source

Get rid of "ini" notation

Alois Mahdal 10 years ago
parent
commit
15f5538ed1

+ 5
- 6
bin/saturnin.skel View File

2
 
2
 
3
 . <(ffoom init)
3
 . <(ffoom init)
4
 
4
 
5
-mkinipath() {
6
-    local userd="__SATURNIN_CONFIG_USER__/ini.d"
5
+mkconfpath() {
6
+    local userd="__SATURNIN_CONFIG_USER__/conf.d"
7
     local user="__SATURNIN_CONFIG_USER__"
7
     local user="__SATURNIN_CONFIG_USER__"
8
     local lcal="__SATURNIN_CONFIG_LOCAL__"
8
     local lcal="__SATURNIN_CONFIG_LOCAL__"
9
-    local distd="__SATURNIN_SHARE__/ini.d"
9
+    local distd="__SATURNIN_SHARE__/conf.d"
10
     test -d "$userd" && find "$userd" -mindepth 1 -maxdepth 1 -type d
10
     test -d "$userd" && find "$userd" -mindepth 1 -maxdepth 1 -type d
11
     echo "$user"
11
     echo "$user"
12
     echo "$lcal"
12
     echo "$lcal"
15
 
15
 
16
 export FFOO_PATH="__SATURNIN_SHARE__/ffoo"
16
 export FFOO_PATH="__SATURNIN_SHARE__/ffoo"
17
 SATURNIN_LIBEXEC="__SATURNIN_LIBEXEC__"
17
 SATURNIN_LIBEXEC="__SATURNIN_LIBEXEC__"
18
-export FFOO_CONFIG_PATH=$(mkinipath | tr '\n' :)
19
-export FFOO_CONFIG_SUFFIX=".ini"
18
+export FFOO_CONFIG_PATH=$(mkconfpath | tr '\n' :)
20
 export SATURNIN_VERSION="__VERSION__"
19
 export SATURNIN_VERSION="__VERSION__"
21
 
20
 
22
-ffoo import exit
21
+ffoo import exits
23
 ffoo import core
22
 ffoo import core
24
 
23
 
25
 usage() {
24
 usage() {

libexec/saturnin-ini → libexec/saturnin-conf View File


+ 5
- 5
libexec/saturnin-dmenu View File

20
 
20
 
21
 test -n "$delim"        && maybe_split=do_split
21
 test -n "$delim"        && maybe_split=do_split
22
 
22
 
23
-nb="$(saturnin ini -p style.color.nbg)"
24
-nf="$(saturnin ini -p style.color.nfg)"
25
-sb="$(saturnin ini -p style.color.sbg)"
26
-sf="$(saturnin ini -p style.color.sfg)"
27
-fn="$(saturnin ini -p style.font)"
23
+nb="$(saturnin conf -p style.color.nbg)"
24
+nf="$(saturnin conf -p style.color.nfg)"
25
+sb="$(saturnin conf -p style.color.sbg)"
26
+sf="$(saturnin conf -p style.color.sfg)"
27
+fn="$(saturnin conf -p style.font)"
28
 fn=${fn:--*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*}
28
 fn=${fn:--*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*}
29
 
29
 
30
 debug -v nb nf sb sf fn
30
 debug -v nb nf sb sf fn

+ 11
- 11
libexec/saturnin-iam View File

45
     # daemons specific to $1 location plus the rest
45
     # daemons specific to $1 location plus the rest
46
     #
46
     #
47
     test -n "$1" || usagef "location"
47
     test -n "$1" || usagef "location"
48
-    saturnin ini -p iam.running.at.$1
49
-    saturnin ini -p iam.running.at.ANYPLACE
48
+    saturnin conf -p iam.running.at.$1
49
+    saturnin conf -p iam.running.at.ANYPLACE
50
 }
50
 }
51
 
51
 
52
 where_i_am() {
52
 where_i_am() {
53
     #
53
     #
54
     # what is my physical location?
54
     # what is my physical location?
55
     #
55
     #
56
-    if=$(saturnin ini -p iam.using.if)
56
+    if=$(saturnin conf -p iam.using.if)
57
     gwmac=$(arp | grep "^gateway\\>.*\\<$if\$" | tr ' ' '\n' | grep :)
57
     gwmac=$(arp | grep "^gateway\\>.*\\<$if\$" | tr ' ' '\n' | grep :)
58
-    saturnin ini -p iam.seeing.gw.$gwmac || echo OUT
58
+    saturnin conf -p iam.seeing.gw.$gwmac || echo OUT
59
 }
59
 }
60
 
60
 
61
 start_familiar() {
61
 start_familiar() {
62
     #
62
     #
63
-    # start familiar as indicated by ini file (unless running)
63
+    # start familiar as indicated by conf file (unless running)
64
     #
64
     #
65
     local f=$1
65
     local f=$1
66
     pids_matching $f && return 0
66
     pids_matching $f && return 0
67
-    local like=$(saturnin ini -p iam.starting.like.this.$f)
67
+    local like=$(saturnin conf -p iam.starting.like.this.$f)
68
     debug -v f like
68
     debug -v f like
69
     if test -n  "$like";
69
     if test -n  "$like";
70
         then
70
         then
75
 
75
 
76
 set_status() {
76
 set_status() {
77
     #
77
     #
78
-    # set public status $1 by command in ini file
78
+    # set public status $1 by command in conf file
79
     #
79
     #
80
     local what=$1
80
     local what=$1
81
-    saturnin ini -p iam.saying.like.this.$what | bash
81
+    saturnin conf -p iam.saying.like.this.$what | bash
82
 }
82
 }
83
 
83
 
84
 sound_is_muted() {
84
 sound_is_muted() {
137
     # changing language
137
     # changing language
138
     #
138
     #
139
     local cur=$(setxkbmap -v | grep '^symbols: ' | cut -d+ -f2)
139
     local cur=$(setxkbmap -v | grep '^symbols: ' | cut -d+ -f2)
140
-    local all="$(saturnin ini    -p iam.typing.lang)"
141
-    local def="$(saturnin ini -1 -p iam.typing.lang)"
140
+    local all="$(saturnin conf    -p iam.typing.lang)"
141
+    local def="$(saturnin conf -1 -p iam.typing.lang)"
142
     local nxt=$(
142
     local nxt=$(
143
         echo -e "$all\n$all" \
143
         echo -e "$all\n$all" \
144
           | grep -m 1 -A 1 $cur \
144
           | grep -m 1 -A 1 $cur \
154
     #
154
     #
155
     # changing language back to normal
155
     # changing language back to normal
156
     #
156
     #
157
-    setxkbmap "$(saturnin ini -1 -p iam.typing.lang)"
157
+    setxkbmap "$(saturnin conf -1 -p iam.typing.lang)"
158
 }
158
 }
159
 
159
 
160
 i_am_deaf() {
160
 i_am_deaf() {

+ 2
- 2
libexec/saturnin-ln View File

38
 }
38
 }
39
 
39
 
40
 load() {
40
 load() {
41
-    saturnin ini -p ln.dir.$1 | expand_tilde | debug_pipe out
41
+    saturnin conf -p ln.dir.$1 | expand_tilde | debug_pipe out
42
 }
42
 }
43
 
43
 
44
 while true; do case $1 in
44
 while true; do case $1 in
53
 test -z "$target"               && target=$DEFAULT_TARGET
53
 test -z "$target"               && target=$DEFAULT_TARGET
54
 
54
 
55
 case $prefix.$name in
55
 case $prefix.$name in
56
-    .)          die "provide at least name or set prefix in ln.ini";;
56
+    .)          die "provide at least name or set prefix in ln.conf";;
57
     $prefix.)   name=$prefix;;
57
     $prefix.)   name=$prefix;;
58
     .$name)     :;;
58
     .$name)     :;;
59
     *)          name=$prefix.$name;;
59
     *)          name=$prefix.$name;;

+ 6
- 6
libexec/saturnin-push View File

5
 ffoo import core
5
 ffoo import core
6
 ffoo import recon
6
 ffoo import recon
7
 
7
 
8
-ORDER="$(saturnin ini -p push.options.order)"
8
+ORDER="$(saturnin conf -p push.options.order)"
9
 
9
 
10
 usage() {
10
 usage() {
11
     usage_is "[-o|--order path:host|host:path] host..."
11
     usage_is "[-o|--order path:host|host:path] host..."
19
     *)              hosts="$1"; shift ;;
19
     *)              hosts="$1"; shift ;;
20
 esac done
20
 esac done
21
 
21
 
22
-test -n "$hosts" || hosts=$(saturnin ini -s push.hosts | debug_pipe ini_hosts)
22
+test -n "$hosts" || hosts=$(saturnin conf -s push.hosts | debug_pipe ini_hosts)
23
 debug -v hosts
23
 debug -v hosts
24
 
24
 
25
 test -n "$hosts" || die "no valid hosts to begin with"
25
 test -n "$hosts" || die "no valid hosts to begin with"
26
-paths=$(saturnin ini -s push.paths)
26
+paths=$(saturnin conf -s push.paths)
27
 test -n "$paths" || die "no valid paths to begin with"
27
 test -n "$paths" || die "no valid paths to begin with"
28
 
28
 
29
 think "Probing & sorting paths"
29
 think "Probing & sorting paths"
55
             do
55
             do
56
                 if rsync -L -r --delete $path $host:
56
                 if rsync -L -r --delete $path $host:
57
                 then
57
                 then
58
-                    think $(collapse_tilde <<<"$path") sent to $host
58
+                    think "$(collapse_tilde <<<"$path") sent to $host"
59
                 fi
59
                 fi
60
             done
60
             done
61
         done
61
         done
68
             do
68
             do
69
                 if rsync -L -r --delete $path $host:
69
                 if rsync -L -r --delete $path $host:
70
                 then
70
                 then
71
-                    think $host got $path
71
+                    think "$host got $path"
72
                 fi
72
                 fi
73
             done
73
             done
74
         done
74
         done
81
 
81
 
82
 for host in $hosts;
82
 for host in $hosts;
83
 do
83
 do
84
-    saturnin ini -s push.commands \
84
+    saturnin conf -s push.commands \
85
       | grep . \
85
       | grep . \
86
       | while read cmd;
86
       | while read cmd;
87
         do
87
         do

+ 4
- 4
libexec/saturnin-revert View File

41
 snapshot="$2"
41
 snapshot="$2"
42
 
42
 
43
 test -z "$snapshot" && {
43
 test -z "$snapshot" && {
44
-    think "looking for $domain in revert.ini"
45
-    snapshot=$(saturnin ini -1 -p revert.to.snapshot.$domain)
44
+    think "looking for $domain in revert.conf"
45
+    snapshot=$(saturnin conf -1 -p revert.to.snapshot.$domain)
46
 }
46
 }
47
 test -z "$snapshot" && {
47
 test -z "$snapshot" && {
48
-    think "looking for default snapshot name in revert.ini"
49
-    snapshot=$(saturnin ini -1 -p revert.to.snapshot._default_)
48
+    think "looking for default snapshot name in revert.conf"
49
+    snapshot=$(saturnin conf -1 -p revert.to.snapshot._default_)
50
 }
50
 }
51
 test -z "$snapshot" && {
51
 test -z "$snapshot" && {
52
     die "could not determine snapshot for $domain"
52
     die "could not determine snapshot for $domain"

+ 1
- 1
setup/mk.sh View File

19
     echo libexec/saturnin-czrates
19
     echo libexec/saturnin-czrates
20
     echo libexec/saturnin-dmenu
20
     echo libexec/saturnin-dmenu
21
     echo libexec/saturnin-iam
21
     echo libexec/saturnin-iam
22
-    echo libexec/saturnin-ini
22
+    echo libexec/saturnin-conf
23
     echo libexec/saturnin-ip
23
     echo libexec/saturnin-ip
24
     echo libexec/saturnin-ln
24
     echo libexec/saturnin-ln
25
     echo libexec/saturnin-push
25
     echo libexec/saturnin-push