Browse Source

Revamp ffmanage as meta command ffoom

Alois Mahdal 10 years ago
parent
commit
af370c2d30
7 changed files with 20 additions and 18 deletions
  1. 1
    1
      bin/ffdoc
  2. 1
    1
      bin/fff.in
  3. 14
    12
      bin/ffoom.in
  4. 1
    1
      doc/examples/template.sh.in
  5. 1
    1
      doc/ffoo.3.md
  6. 1
    1
      setup/mk.sh
  7. 1
    1
      test/iniread.in

bin/ffdoc.in → bin/ffdoc View File

@@ -1,6 +1,6 @@
1 1
 #!/bin/bash
2 2
 
3
-. __FFOO_DIR__/ffoo.sh
3
+. <(ffoom init)
4 4
 
5 5
 ffoo import core
6 6
 

+ 1
- 1
bin/fff.in View File

@@ -1,6 +1,6 @@
1 1
 #!/bin/bash
2 2
 
3
-. __FFOO_DIR__/ffoo.sh
3
+. <(ffoom init)
4 4
 
5 5
 ffoo import core
6 6
 

bin/ffmanage.in → bin/ffoom.in View File

@@ -6,10 +6,12 @@ ffoo import core
6 6
 
7 7
 
8 8
 usage() {
9
-    usage_is "[-d] --list-modules" \
10
-             "[-d] --list-functions [module]" \
11
-             "[-d] --library-init" \
12
-             "[-d] --version"
9
+    usage_is \
10
+             "[-d] --version"       \
11
+             "[-d] init"            \
12
+             "[-d] init_path"       \
13
+             "[-d] lsfun [module]"  \
14
+             "[-d] lsmod"
13 15
 }
14 16
 
15 17
 version_info() {
@@ -20,23 +22,19 @@ version_info() {
20 22
 }
21 23
 
22 24
 while true; do case $1 in
23
-        -d|--debug)
24
-            FFOO_DEBUG=true;
25
-            shift;
26
-            ;;
27
-        --init-body)
25
+        init)
28 26
             cat "__FFOO_DIR__/ffoo.sh"
29 27
             exit $?
30 28
             ;;
31
-        --init-path)
29
+        init_path)
32 30
             echo "__FFOO_DIR__/ffoo.sh"
33 31
             exit 0
34 32
             ;;
35
-        --list-modules)
33
+        lsmod)
36 34
             ffoo _list_all_modules
37 35
             exit $?
38 36
             ;;
39
-        --list-functions)
37
+        lsfun)
40 38
             if test -n "$2";
41 39
             then
42 40
                 ffoo _list_functions_in_mfile $(ffoo _list_mfiles_like $2)
@@ -46,6 +44,10 @@ while true; do case $1 in
46 44
                 exit $?
47 45
             fi
48 46
             ;;
47
+        -d|--debug)
48
+            FFOO_DEBUG=true;
49
+            shift;
50
+            ;;
49 51
         --version)
50 52
             version_info
51 53
             exit 0

+ 1
- 1
doc/examples/template.sh.in View File

@@ -1,6 +1,6 @@
1 1
 #!/bin/bash
2 2
 
3
-. __FFOO_INIT__
3
+. <(ffoom init)
4 4
 
5 5
 ffoo import core
6 6
 

+ 1
- 1
doc/ffoo.3.md View File

@@ -6,7 +6,7 @@ SYNOPSIS
6 6
 
7 7
     #!/bin/bash
8 8
     # ~/bin/example
9
-    source /usr/share/lib/ffoo/ffoo.sh
9
+    source <(ffoom init)
10 10
     ffoo import core
11 11
 
12 12
     # basic echo helpers

+ 1
- 1
setup/mk.sh View File

@@ -15,7 +15,7 @@ shrdir=${DESTDIR}${PREFIX}/share/ffoo
15 15
 list_of_bins() {
16 16
     echo bin/ffdoc
17 17
     echo bin/fff
18
-    echo bin/ffmanage
18
+    echo bin/ffoom
19 19
 }
20 20
 
21 21
 list_of_installed_bins() {

+ 1
- 1
test/iniread.in View File

@@ -2,7 +2,7 @@
2 2
 
3 3
 . /usr/share/beakerlib/beakerlib.sh
4 4
 
5
-. __FFOO_DIR__/ffoo.sh
5
+. <(ffoom init)
6 6
 ffoo import ini
7 7
 
8 8