Sfoglia il codice sorgente

Update for ffoo-0.0.16

Alois Mahdal 10 anni fa
parent
commit
c697ebcf29
6 ha cambiato i file con 18 aggiunte e 16 eliminazioni
  1. 6
    5
      bin/saturnin.skel
  2. 2
    2
      config.mk
  3. 3
    3
      ffoo/www.sh
  4. 2
    2
      libexec/saturnin-ini
  5. 3
    2
      libexec/saturnin-www
  6. 2
    2
      setup/mk.sh

+ 6
- 5
bin/saturnin.skel Vedi File

@@ -3,9 +3,9 @@
3 3
 . <(ffoom init)
4 4
 
5 5
 mkinipath() {
6
-    local userd="__SATURNIN_INI_USER__/ini.d"
7
-    local user="__SATURNIN_INI_USER__"
8
-    local lcal="__SATURNIN_INI_LOCAL__"
6
+    local userd="__SATURNIN_CONFIG_USER__/ini.d"
7
+    local user="__SATURNIN_CONFIG_USER__"
8
+    local lcal="__SATURNIN_CONFIG_LOCAL__"
9 9
     local distd="__SATURNIN_SHARE__/ini.d"
10 10
     test -d "$userd" && find "$userd" -mindepth 1 -maxdepth 1 -type d
11 11
     echo "$user"
@@ -15,7 +15,8 @@ mkinipath() {
15 15
 
16 16
 export FFOO_PATH="__SATURNIN_SHARE__/ffoo"
17 17
 SATURNIN_LIBEXEC="__SATURNIN_LIBEXEC__"
18
-export FFOO_INI_PATH=$(mkinipath | tr '\n' :)
18
+export FFOO_CONFIG_PATH=$(mkinipath | tr '\n' :)
19
+export FFOO_CONFIG_SUFFIX=".ini"
19 20
 
20 21
 ffoo import exit
21 22
 ffoo import core
@@ -42,7 +43,7 @@ while true; do case $1 in
42 43
     *)              break;                          ;;
43 44
 esac done
44 45
 
45
-debug -v FFOO_PATH SATURNIN_LIBEXEC FFOO_INI_PATH
46
+debug -v FFOO_PATH SATURNIN_LIBEXEC FFOO_CONFIG_PATH
46 47
 debug "\$@=$@"
47 48
 
48 49
 scmd=$1

+ 2
- 2
config.mk Vedi File

@@ -3,5 +3,5 @@ VERSION = 0.0.1
3 3
 STAGE = devel
4 4
 PREFIX = /usr/local
5 5
 MANPREFIX = ${PREFIX}/share/man
6
-SATURNIN_INI_PATH_LOCAL = /etc/saturnin
7
-SATURNIN_INI_PATH_USER = .saturnin
6
+SATURNIN_CONFIG_PATH_LOCAL = /etc/saturnin
7
+SATURNIN_CONFIG_PATH_USER = .saturnin

+ 3
- 3
ffoo/www.sh Vedi File

@@ -1,7 +1,7 @@
1 1
 #!/bin/bash
2 2
 
3 3
 ffoo import core
4
-ffoo import ini
4
+ffoo import config
5 5
 
6 6
 
7 7
 filter_exprs() {
@@ -123,11 +123,11 @@ kw2uri() {
123 123
         debug -v kw query
124 124
         if test -n "$query";
125 125
         then
126
-            local fmt=$(iniread -1 -p www.query.$kw)
126
+            local fmt=$(cfgrep -1 -p www.query.$kw)
127 127
             debug -v fmt
128 128
             printf "$fmt\n" "$query"
129 129
         else
130
-            iniread -1 -p www.bookmark.$kw
130
+            cfgrep -1 -p www.bookmark.$kw
131 131
         fi
132 132
     done
133 133
 }

+ 2
- 2
libexec/saturnin-ini Vedi File

@@ -2,9 +2,9 @@
2 2
 
3 3
 . <(ffoom init)
4 4
 
5
+ffoo import config
5 6
 ffoo import core
6
-ffoo import ini
7 7
 
8 8
 debug "\$@=$@"
9 9
 
10
-iniread "$@"
10
+cfgrep "$@"

+ 3
- 2
libexec/saturnin-www Vedi File

@@ -2,7 +2,8 @@
2 2
 
3 3
 . <(ffoom init)
4 4
 
5
-ffoo import ini
5
+ffoo import config
6
+ffoo import core
6 7
 ffoo import www
7 8
 ffoo import xorg
8 9
 
@@ -10,6 +11,6 @@ debug "\$@=$@"
10 11
 
11 12
 test -z "$uri" && uri="$(echo "$@" | find_uri)"
12 13
 test -z "$uri" && uri="$(clipln | find_uri)"
13
-test -z "$uri" && uri="$(iniread -p www.bookmark.default)"
14
+test -z "$uri" && uri="$(cfgrep -p www.bookmark.default)"
14 15
 
15 16
 echo "$uri"

+ 2
- 2
setup/mk.sh Vedi File

@@ -127,8 +127,8 @@ expand_variables() {
127 127
     # Expand variable values
128 128
     #
129 129
     perl -pe "
130
-        s|__SATURNIN_INI_LOCAL__|$SATURNIN_INI_PATH_LOCAL|;
131
-        s|__SATURNIN_INI_USER__|\\\$HOME/$SATURNIN_INI_PATH_USER|;
130
+        s|__SATURNIN_CONFIG_LOCAL__|$SATURNIN_CONFIG_PATH_LOCAL|;
131
+        s|__SATURNIN_CONFIG_USER__|\\\$HOME/$SATURNIN_CONFIG_PATH_USER|;
132 132
         s|__SATURNIN_SHARE__|$shrdir|;
133 133
         s|__SATURNIN_LIBEXEC__|$lexdir|;
134 134
         s|__VERSION__|$(get_version)|;