|
@@ -1,9 +1,21 @@
|
1
|
1
|
#!/bin/bash
|
2
|
2
|
|
3
|
3
|
. <(ffoom init)
|
4
|
|
-export FFOO_INI_PATH="$SATURNIN_INI_PATH:__SATURNIN_INI_PATH__"
|
5
|
|
-export FFOO_PATH="__SATURNIN_FFOO_PATH__"
|
6
|
|
-saturnin_libexec="__SATURNIN_LIBEXEC__"
|
|
4
|
+
|
|
5
|
+mkinipath() {
|
|
6
|
+ local userd="__SATURNIN_INI_USER__/ini.d"
|
|
7
|
+ local user="__SATURNIN_INI_USER__"
|
|
8
|
+ local lcal="__SATURNIN_INI_LOCAL__"
|
|
9
|
+ local distd="__SATURNIN_SHARE__/ini.d"
|
|
10
|
+ test -d "$userd" && find "$userd" -mindepth 1 -maxdepth 1 -type d
|
|
11
|
+ echo "$user"
|
|
12
|
+ echo "$lcal"
|
|
13
|
+ test -d "$distd" && find "$distd" -mindepth 1 -maxdepth 1 -type d
|
|
14
|
+}
|
|
15
|
+
|
|
16
|
+export FFOO_PATH="__SATURNIN_SHARE__/ffoo"
|
|
17
|
+SATURNIN_LIBEXEC="__SATURNIN_LIBEXEC__"
|
|
18
|
+export FFOO_INI_PATH=$(mkinipath | tr '\n' :)
|
7
|
19
|
|
8
|
20
|
ffoo import exit
|
9
|
21
|
ffoo import core
|
|
@@ -16,7 +28,7 @@ usage() {
|
16
|
28
|
print_help() {
|
17
|
29
|
echo "valid commands:"
|
18
|
30
|
echo ""
|
19
|
|
- ls "$saturnin_libexec" \
|
|
31
|
+ ls "$SATURNIN_LIBEXEC" \
|
20
|
32
|
| sed -e 's/saturnin-/ /'
|
21
|
33
|
}
|
22
|
34
|
|
|
@@ -30,6 +42,7 @@ while true; do case $1 in
|
30
|
42
|
*) break; ;;
|
31
|
43
|
esac done
|
32
|
44
|
|
|
45
|
+debug -v FFOO_PATH SATURNIN_LIBEXEC FFOO_INI_PATH
|
33
|
46
|
debug "\$@=$@"
|
34
|
47
|
|
35
|
48
|
scmd=$1
|
|
@@ -38,7 +51,7 @@ shift
|
38
|
51
|
case $scmd in
|
39
|
52
|
help) print_help; exit $FFOO_EXIT_OK ;;
|
40
|
53
|
*)
|
41
|
|
- lexpath="$saturnin_libexec/saturnin-$scmd"
|
|
54
|
+ lexpath="$SATURNIN_LIBEXEC/saturnin-$scmd"
|
42
|
55
|
debug -v lexpath
|
43
|
56
|
debug "\$@='$@'"
|
44
|
57
|
test -x "$lexpath" && exec "$lexpath" "$@"
|