Browse Source

Use proper naming scheme

Alois Mahdal 8 years ago
parent
commit
ed7847f49b
2 changed files with 12 additions and 12 deletions
  1. 3
    3
      src/bin/satcmd.skel
  2. 9
    9
      src/shellfu/saturnin.sh

+ 3
- 3
src/bin/satcmd.skel View File

@@ -65,10 +65,10 @@ shift
65 65
 
66 66
 case "$SATURNIN_SUBCOMMAND" in
67 67
     conf)               inigrep "$@"    ;;
68
-    help)               saturnin_help ;;
69
-    _ls_subcommands)    saturnin_lssc ;;
68
+    help)               saturnin__help ;;
69
+    _ls_subcommands)    saturnin__lssc ;;
70 70
     _lsfun)             shellfu-get lsfun ;;
71 71
     _lsmod)             shellfu-get lsmod ;;
72 72
     _ffrun)             ffrun "$@" ;;
73
-    *)                  saturnin_runsc "$@" ;;
73
+    *)                  saturnin__runsc "$@" ;;
74 74
 esac

+ 9
- 9
src/shellfu/saturnin.sh View File

@@ -4,20 +4,20 @@ shellfu import exit
4 4
 shellfu import inigrep
5 5
 shellfu import pretty
6 6
 
7
-saturnin_help() {
7
+saturnin__help() {
8 8
     {
9 9
         echo "built-in commands:"
10 10
         echo "    conf"
11 11
         echo "    help"
12 12
         echo ""
13 13
         echo "installed commands:"
14
-        saturnin_lssc \
14
+        saturnin__lssc \
15 15
           | sed -e 's/^/    /'
16 16
     } | mkhelp -E -f -
17 17
     return "$SHELLFU_EXIT_OK"
18 18
 }
19 19
 
20
-saturnin_lssc() {
20
+saturnin__lssc() {
21 21
     find "$SATURNIN_LIBEXEC" \
22 22
         -mindepth 1 \
23 23
         -maxdepth 1 \
@@ -26,7 +26,7 @@ saturnin_lssc() {
26 26
       | sort
27 27
 }
28 28
 
29
-saturnin_runhook() {
29
+saturnin__runhook() {
30 30
     #
31 31
     # Run custom hook
32 32
     #
@@ -45,7 +45,7 @@ saturnin_runhook() {
45 45
     eval "$hook_code"
46 46
 }
47 47
 
48
-saturnin_runsc() {
48
+saturnin__runsc() {
49 49
     local lexpath
50 50
     lexpath+="$SATURNIN_LIBEXEC/"
51 51
     lexpath+="$SATURNIN_LIBEXEC_PREFIX$SATURNIN_SUBCOMMAND"
@@ -53,13 +53,13 @@ saturnin_runsc() {
53 53
     debug "\$*='$*'"
54 54
     test -x "$lexpath" || {
55 55
         warn "invalid sub-command: $SATURNIN_SUBCOMMAND"
56
-        saturnin_help
56
+        saturnin__help
57 57
         return "$SHELLFU_EXIT_USAGE"
58 58
     }
59 59
     "$lexpath" "$@"
60 60
 }
61 61
 
62
-saturnin_wraphook() {
62
+saturnin__wraphook() {
63 63
     #
64 64
     # Wrap command "$@" in hooks
65 65
     #
@@ -68,9 +68,9 @@ saturnin_wraphook() {
68 68
     # post-hook if "$@" failed.
69 69
     #
70 70
     local es=0
71
-    saturnin_runhook pre
71
+    saturnin__runhook pre
72 72
     "$@" || return $?
73 73
     es=$?
74
-    saturnin_runhook post
74
+    saturnin__runhook post
75 75
     return $es
76 76
 }