Browse Source

Update for ffoo-0.0.16

Alois Mahdal 10 years ago
parent
commit
c697ebcf29
6 changed files with 18 additions and 16 deletions
  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 View File

3
 . <(ffoom init)
3
 . <(ffoom init)
4
 
4
 
5
 mkinipath() {
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
     local distd="__SATURNIN_SHARE__/ini.d"
9
     local distd="__SATURNIN_SHARE__/ini.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"
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_INI_PATH=$(mkinipath | tr '\n' :)
18
+export FFOO_CONFIG_PATH=$(mkinipath | tr '\n' :)
19
+export FFOO_CONFIG_SUFFIX=".ini"
19
 
20
 
20
 ffoo import exit
21
 ffoo import exit
21
 ffoo import core
22
 ffoo import core
42
     *)              break;                          ;;
43
     *)              break;                          ;;
43
 esac done
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
 debug "\$@=$@"
47
 debug "\$@=$@"
47
 
48
 
48
 scmd=$1
49
 scmd=$1

+ 2
- 2
config.mk View File

3
 STAGE = devel
3
 STAGE = devel
4
 PREFIX = /usr/local
4
 PREFIX = /usr/local
5
 MANPREFIX = ${PREFIX}/share/man
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 View File

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

+ 2
- 2
libexec/saturnin-ini View File

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

+ 3
- 2
libexec/saturnin-www View File

2
 
2
 
3
 . <(ffoom init)
3
 . <(ffoom init)
4
 
4
 
5
-ffoo import ini
5
+ffoo import config
6
+ffoo import core
6
 ffoo import www
7
 ffoo import www
7
 ffoo import xorg
8
 ffoo import xorg
8
 
9
 
10
 
11
 
11
 test -z "$uri" && uri="$(echo "$@" | find_uri)"
12
 test -z "$uri" && uri="$(echo "$@" | find_uri)"
12
 test -z "$uri" && uri="$(clipln | find_uri)"
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
 echo "$uri"
16
 echo "$uri"

+ 2
- 2
setup/mk.sh View File

127
     # Expand variable values
127
     # Expand variable values
128
     #
128
     #
129
     perl -pe "
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
         s|__SATURNIN_SHARE__|$shrdir|;
132
         s|__SATURNIN_SHARE__|$shrdir|;
133
         s|__SATURNIN_LIBEXEC__|$lexdir|;
133
         s|__SATURNIN_LIBEXEC__|$lexdir|;
134
         s|__VERSION__|$(get_version)|;
134
         s|__VERSION__|$(get_version)|;