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
 #!/bin/bash
1
 #!/bin/bash
2
 
2
 
3
-. __FFOO_DIR__/ffoo.sh
3
+. <(ffoom init)
4
 
4
 
5
 ffoo import core
5
 ffoo import core
6
 
6
 

+ 1
- 1
bin/fff.in View File

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

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

6
 
6
 
7
 
7
 
8
 usage() {
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
 version_info() {
17
 version_info() {
20
 }
22
 }
21
 
23
 
22
 while true; do case $1 in
24
 while true; do case $1 in
23
-        -d|--debug)
24
-            FFOO_DEBUG=true;
25
-            shift;
26
-            ;;
27
-        --init-body)
25
+        init)
28
             cat "__FFOO_DIR__/ffoo.sh"
26
             cat "__FFOO_DIR__/ffoo.sh"
29
             exit $?
27
             exit $?
30
             ;;
28
             ;;
31
-        --init-path)
29
+        init_path)
32
             echo "__FFOO_DIR__/ffoo.sh"
30
             echo "__FFOO_DIR__/ffoo.sh"
33
             exit 0
31
             exit 0
34
             ;;
32
             ;;
35
-        --list-modules)
33
+        lsmod)
36
             ffoo _list_all_modules
34
             ffoo _list_all_modules
37
             exit $?
35
             exit $?
38
             ;;
36
             ;;
39
-        --list-functions)
37
+        lsfun)
40
             if test -n "$2";
38
             if test -n "$2";
41
             then
39
             then
42
                 ffoo _list_functions_in_mfile $(ffoo _list_mfiles_like $2)
40
                 ffoo _list_functions_in_mfile $(ffoo _list_mfiles_like $2)
46
                 exit $?
44
                 exit $?
47
             fi
45
             fi
48
             ;;
46
             ;;
47
+        -d|--debug)
48
+            FFOO_DEBUG=true;
49
+            shift;
50
+            ;;
49
         --version)
51
         --version)
50
             version_info
52
             version_info
51
             exit 0
53
             exit 0

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

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

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

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

+ 1
- 1
setup/mk.sh View File

15
 list_of_bins() {
15
 list_of_bins() {
16
     echo bin/ffdoc
16
     echo bin/ffdoc
17
     echo bin/fff
17
     echo bin/fff
18
-    echo bin/ffmanage
18
+    echo bin/ffoom
19
 }
19
 }
20
 
20
 
21
 list_of_installed_bins() {
21
 list_of_installed_bins() {

+ 1
- 1
test/iniread.in View File

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