Ver código fonte

Drop d; this is not a daemon

Alois Mahdal 11 anos atrás
pai
commit
1e20d6ddf8
21 arquivos alterados com 186 adições e 186 exclusões
  1. 5
    5
      Makefile
  2. 5
    5
      README
  3. 3
    3
      bin/ffdoc.in
  4. 5
    5
      bin/fff.in
  5. 10
    10
      bin/ffmanage.in
  6. 4
    4
      doc/examples/template.sh.in
  7. 10
    10
      doc/ffoo.3.md
  8. 81
    0
      ffoo.sh.in
  9. 0
    81
      ffood.sh.in
  10. 6
    6
      include/core.sh
  11. 8
    8
      include/mkpretty_color.sh
  12. 4
    4
      include/proj_ol.sh
  13. 1
    1
      include/recon.sh
  14. 2
    2
      include/sw.sh
  15. 17
    17
      include/termcolors.sh
  16. 5
    5
      include/testing.sh
  17. 1
    1
      include/www.sh
  18. 1
    1
      include/xorg.sh
  19. 2
    2
      notes/TODO.md
  20. 14
    14
      setup/mk.sh
  21. 2
    2
      test/iniread.in

+ 5
- 5
Makefile Ver arquivo

@@ -1,12 +1,12 @@
1
-# ffood - Fast Food - a Bash Library
1
+# ffoo - Fast Foo - a Bash Library
2 2
 # See LICENSE file for copyright and license details.
3 3
 
4 4
 include config.mk
5 5
 
6
-all: options doc ffood
6
+all: options doc ffoo
7 7
 
8 8
 options:
9
-	@echo ffood build options:
9
+	@echo ffoo build options:
10 10
 	@echo "VERSION  = ${VERSION}"
11 11
 	@echo "PREFIX   = ${PREFIX}"
12 12
 
@@ -19,8 +19,8 @@ install_manpages: manpages
19 19
 manpages:
20 20
 	@setup/mk.sh manpages
21 21
 
22
-ffood:
23
-	@setup/mk.sh ffood
22
+ffoo:
23
+	@setup/mk.sh ffoo
24 24
 
25 25
 test: install
26 26
 	@setup/mk.sh test

+ 5
- 5
README Ver arquivo

@@ -1,7 +1,7 @@
1
-Fast Food Bash library
2
-======================
1
+Fast Foo Bash library
2
+=====================
3 3
 
4
-ffood - Fast Food - a Bash Library
4
+ffoo - Fast Foo - a Bash Library
5 5
 
6 6
 
7 7
 NOTES
@@ -27,8 +27,8 @@ NOTES
27 27
     This is "fixed" by adding at least one all-matching `grep`
28 28
     command before the while loop.
29 29
 
30
- *  iniread: when same key is found in eg. /etc/ffood/ffood.ini
31
-    and ~/.ffood.ffood.ini, output is concatenated.  If you
30
+ *  iniread: when same key is found in eg. /etc/ffoo/ffoo.ini
31
+    and ~/.ffoo.ffoo.ini, output is concatenated.  If you
32 32
     want the value be rather overriden, you can simply add
33 33
     `-1` to limit output to the last one.
34 34
 

+ 3
- 3
bin/ffdoc.in Ver arquivo

@@ -1,8 +1,8 @@
1 1
 #!/bin/bash
2 2
 
3
-. __FFOOD_DIR__/ffood.sh
3
+. __FFOO_DIR__/ffoo.sh
4 4
 
5
-ffood import core
5
+ffoo import core
6 6
 
7 7
 
8 8
 usage() {
@@ -11,4 +11,4 @@ usage() {
11 11
 
12 12
 target=$1
13 13
 test -n "$target" || usage
14
-ffood doc "$target"
14
+ffoo doc "$target"

+ 5
- 5
bin/fff.in Ver arquivo

@@ -1,8 +1,8 @@
1 1
 #!/bin/bash
2 2
 
3
-. __FFOOD_DIR__/ffood.sh
3
+. __FFOO_DIR__/ffoo.sh
4 4
 
5
-ffood import core
5
+ffoo import core
6 6
 
7 7
 
8 8
 usage() {
@@ -14,11 +14,11 @@ includes=""
14 14
 while true; do
15 15
     case $1 in
16 16
         -d|--debug)
17
-            FFOOD_DEBUG=true
17
+            FFOO_DEBUG=true
18 18
             shift 1
19 19
             ;;
20 20
         -v|--verbose)
21
-            FFOOD_VERBOSE=true
21
+            FFOO_VERBOSE=true
22 22
             shift 1
23 23
             ;;
24 24
         -I|--include)
@@ -39,7 +39,7 @@ while true; do
39 39
 done
40 40
 
41 41
 for i in $(tr ":" " " <<<"$includes"); do
42
-    ffood import $i
42
+    ffoo import $i
43 43
 done
44 44
 
45 45
 "$@"

+ 10
- 10
bin/ffmanage.in Ver arquivo

@@ -1,8 +1,8 @@
1 1
 #!/bin/bash
2 2
 
3
-. __FFOOD_DIR__/ffood.sh
3
+. __FFOO_DIR__/ffoo.sh
4 4
 
5
-ffood import core
5
+ffoo import core
6 6
 
7 7
 
8 8
 usage() {
@@ -13,32 +13,32 @@ usage() {
13 13
 }
14 14
 
15 15
 version_info() {
16
-    echo "$(basename $0) (Fast Food bash library) $FFOOD_VERSION"
16
+    echo "$(basename $0) (Fast Foo bash library) $FFOO_VERSION"
17 17
     echo
18
-    echo "install path: __FFOOD_DIR__"
19
-    echo "data path: $FFOOD_DATA_DIR"
18
+    echo "install path: __FFOO_DIR__"
19
+    echo "data path: $FFOO_DATA_DIR"
20 20
 }
21 21
 
22 22
 while true; do case $1 in
23 23
         -d|--debug)
24
-            FFOOD_DEBUG=true;
24
+            FFOO_DEBUG=true;
25 25
             shift;
26 26
             ;;
27 27
         --library-init)
28
-            echo "__FFOOD_DIR__/ffood.sh"
28
+            echo "__FFOO_DIR__/ffoo.sh"
29 29
             exit 0
30 30
             ;;
31 31
         --list-modules)
32
-            ffood _list_all_modules
32
+            ffoo _list_all_modules
33 33
             exit $?
34 34
             ;;
35 35
         --list-functions)
36 36
             if test -n "$2";
37 37
             then
38
-                ffood _list_functions_in_mfile $(ffood _list_mfiles_like $2)
38
+                ffoo _list_functions_in_mfile $(ffoo _list_mfiles_like $2)
39 39
                 exit $?
40 40
             else
41
-                ffood _list_all_functions
41
+                ffoo _list_all_functions
42 42
                 exit $?
43 43
             fi
44 44
             ;;

+ 4
- 4
doc/examples/template.sh.in Ver arquivo

@@ -1,8 +1,8 @@
1 1
 #!/bin/bash
2 2
 
3
-. __FFOOD_DIR__/ffood.sh
3
+. __FFOO_DIR__/ffoo.sh
4 4
 
5
-ffood import core
5
+ffoo import core
6 6
 
7
-FFOOD_VERBOSE=true
8
-FFOOD_DEBUG=true
7
+FFOO_VERBOSE=true
8
+FFOO_DEBUG=true

doc/ffood.3.md → doc/ffoo.3.md Ver arquivo

@@ -1,16 +1,16 @@
1
-FFOOD
2
-=====
1
+FFOO
2
+====
3 3
 
4 4
 SYNOPSIS
5 5
 --------
6 6
 
7 7
     #!/bin/bash
8 8
     # ~/bin/example
9
-    source /usr/share/lib/ffood/ffood.sh
10
-    ffood import core
9
+    source /usr/share/lib/ffoo/ffoo.sh
10
+    ffoo import core
11 11
 
12 12
     # basic echo helpers
13
-    think "about saying something..."   # like echo if FFOOD_VERBOSE
13
+    think "about saying something..."   # like echo if FFOO_VERBOSE
14 14
     warn "this is just an example"      # obvious :)
15 15
     false || die "false was true!"      # Perlism :)
16 16
     x=1; y=2; z=3
@@ -21,8 +21,8 @@ SYNOPSIS
21 21
     echo "hello" | debug_pipe mypipe    # debug:PIPE mypipe: hello
22 22
 
23 23
     # more advanced functions
24
-    FFOOD_DATADIR=$HOME/.example
25
-    cat >$FFOOD_DATADIR/main.ini <<EOF
24
+    FFOO_DATADIR=$HOME/.example
25
+    cat >$FFOO_DATADIR/main.ini <<EOF
26 26
     # a sample ini file
27 27
     [mysection]
28 28
         key = something
@@ -38,7 +38,7 @@ SYNOPSIS
38 38
     python sample.py                        # "will work!" due to the -S
39 39
 
40 40
     # even more
41
-    ffood import recon
41
+    ffoo import recon
42 42
     wait_until -e ! test -e badfile         # -e means use eval (make "!" work)
43 43
     think "the badfile is away..."
44 44
     bad_file_away() {                       # but you can avoid eval
@@ -47,13 +47,13 @@ SYNOPSIS
47 47
     wait_until bad_file_away
48 48
 
49 49
     # ... and more
50
-    ffood import recon
50
+    ffoo import recon
51 51
     register_artifact this_file_will_exist.log
52 52
     some_important_program > this_file_will_exist.log
53 53
     collect_artifacts                       # will preserve tree from /
54 54
 
55 55
     # ...AND MORE!
56
-    ffood import sw
56
+    ffoo import sw
57 57
     cat > dependencies.ini <<EOF
58 58
     [needs/now]
59 59
         yum = ronn

+ 81
- 0
ffoo.sh.in Ver arquivo

@@ -0,0 +1,81 @@
1
+#!/bin/bash
2
+
3
+FFOO_DATA_DIR=${FFOO_DATA_DIR:-$HOME/.ffoo}
4
+FFOO_DIR=${FFOO_DIR:-__FFOO_DIR__}
5
+FFOO_ARTIFACTS_DIR=${FFOO_ARTIFACTS_DIR:-artifacts}
6
+FFOO_DEBUG=${FFOO_DEBUG:-false}
7
+FFOO_DEBUGINIT=${FFOO_DEBUGINIT:-false}
8
+FFOO_INCLUDE=${FFOO_INCLUDE:-$FFOO_DIR/include}
9
+FFOO_MKPRETTY=${FFOO_MKPRETTY:-plain}
10
+FFOO_VERBOSE=${FFOO_VERBOSE:-false}
11
+FFOO_VERSION=__VERSION__
12
+
13
+ffoo() {
14
+    case $1 in
15
+        __debug)
16
+            $FFOO_DEBUGINIT || return 0
17
+            shift
18
+            echo "debug: $@" >&2
19
+            ;;
20
+        __die)
21
+            shift
22
+            echo "$@" >&2
23
+            exit 1
24
+            ;;
25
+        doc)
26
+            ffoo __die "not implemented (sorry...)"
27
+            ;;
28
+        import)
29
+            ffoo __debug "importing module $2"
30
+            local mfile=$(ffoo _list_mfiles_like $2 | head -1)
31
+            test -n "$mfile" || ffoo __die "cannot find module $2"
32
+            ffoo __debug "found module file: $mfile"
33
+            . $mfile
34
+            return $?
35
+            ;;
36
+        _list_all_functions)
37
+            local mfile
38
+            ffoo _list_all_mfiles | while read mfile;
39
+            do
40
+                ffoo _list_functions_in_mfile "$mfile"
41
+            done
42
+            ;;
43
+        _list_all_modules)
44
+            local mp mfn;
45
+            ffoo _list_all_mfiles | while read mp;
46
+            do
47
+                mfn="${mp##*/}"
48
+                echo "${mfn%%.sh}"
49
+            done
50
+            ;;
51
+        _list_all_mfiles)
52
+            {
53
+                echo $FFOO_INCLUDE/*.sh | tr ' ' '\n'
54
+                test -n "$FFOO_PATH" && echo $FFOO_PATH/*.sh
55
+            } | tr ' ' '\n'
56
+            ;;
57
+        _list_mfiles_like)
58
+            test -f "$FFOO_INCLUDE/$2.sh"                  && echo "$FFOO_INCLUDE/$2.sh"
59
+            test -n "$FFOO_PATH" -a -f "$FFOO_PATH/$2.sh" && echo "$FFOO_PATH/$2.sh"
60
+            ;;
61
+        _list_functions_in_mfile)
62
+            local mfile="$2"
63
+            grep -HE '^[[:alnum:]_]+\(\) \{' "$mfile" \
64
+              | sed -e 's/^.*\///; s/\.sh:/./; s/(.*//'
65
+            ;;
66
+        *)
67
+            ffoo __die "unknown ffoo command: $1"
68
+            ;;
69
+    esac
70
+}
71
+
72
+ffoo __debug "FFOO_DATA_DIR='$FFOO_DATA_DIR'"
73
+ffoo __debug "FFOO_DIR='$FFOO_DIR'"
74
+ffoo __debug "FFOO_ARTIFACTS_DIR='$FFOO_ARTIFACTS_DIR'"
75
+ffoo __debug "FFOO_DEBUG='$FFOO_DEBUG'"
76
+ffoo __debug "FFOO_DEBUGINIT='$FFOO_DEBUGINIT'"
77
+ffoo __debug "FFOO_INCLUDE='$FFOO_INCLUDE'"
78
+ffoo __debug "FFOO_INIPATH='$FFOO_INIPATH'"
79
+ffoo __debug "FFOO_MKPRETTY='$FFOO_MKPRETTY'"
80
+ffoo __debug "FFOO_VERBOSE='$FFOO_VERBOSE'"
81
+ffoo __debug "FFOO_VERSION='$FFOO_VERSION'"

+ 0
- 81
ffood.sh.in Ver arquivo

@@ -1,81 +0,0 @@
1
-#!/bin/bash
2
-
3
-FFOOD_DATA_DIR=${FFOOD_DATA_DIR:-$HOME/.ffood}
4
-FFOOD_DIR=${FFOOD_DIR:-__FFOOD_DIR__}
5
-FFOOD_ARTIFACTS_DIR=${FFOOD_ARTIFACTS_DIR:-artifacts}
6
-FFOOD_DEBUG=${FFOOD_DEBUG:-false}
7
-FFOOD_DEBUGINIT=${FFOOD_DEBUGINIT:-false}
8
-FFOOD_INCLUDE=${FFOOD_INCLUDE:-$FFOOD_DIR/include}
9
-FFOOD_MKPRETTY=${FFOOD_MKPRETTY:-plain}
10
-FFOOD_VERBOSE=${FFOOD_VERBOSE:-false}
11
-FFOOD_VERSION=__VERSION__
12
-
13
-ffood() {
14
-    case $1 in
15
-        __debug)
16
-            $FFOOD_DEBUGINIT || return 0
17
-            shift
18
-            echo "debug: $@" >&2
19
-            ;;
20
-        __die)
21
-            shift
22
-            echo "$@" >&2
23
-            exit 1
24
-            ;;
25
-        doc)
26
-            ffood __die "not implemented (sorry...)"
27
-            ;;
28
-        import)
29
-            ffood __debug "importing module $2"
30
-            local mfile=$(ffood _list_mfiles_like $2 | head -1)
31
-            test -n "$mfile" || ffood __die "cannot find module $2"
32
-            ffood __debug "found module file: $mfile"
33
-            . $mfile
34
-            return $?
35
-            ;;
36
-        _list_all_functions)
37
-            local mfile
38
-            ffood _list_all_mfiles | while read mfile;
39
-            do
40
-                ffood _list_functions_in_mfile "$mfile"
41
-            done
42
-            ;;
43
-        _list_all_modules)
44
-            local mp mfn;
45
-            ffood _list_all_mfiles | while read mp;
46
-            do
47
-                mfn="${mp##*/}"
48
-                echo "${mfn%%.sh}"
49
-            done
50
-            ;;
51
-        _list_all_mfiles)
52
-            {
53
-                echo $FFOOD_INCLUDE/*.sh | tr ' ' '\n'
54
-                test -n "$FFOOD_PATH" && echo $FFOOD_PATH/*.sh
55
-            } | tr ' ' '\n'
56
-            ;;
57
-        _list_mfiles_like)
58
-            test -f "$FFOOD_INCLUDE/$2.sh"                  && echo "$FFOOD_INCLUDE/$2.sh"
59
-            test -n "$FFOOD_PATH" -a -f "$FFOOD_PATH/$2.sh" && echo "$FFOOD_PATH/$2.sh"
60
-            ;;
61
-        _list_functions_in_mfile)
62
-            local mfile="$2"
63
-            grep -HE '^[[:alnum:]_]+\(\) \{' "$mfile" \
64
-              | sed -e 's/^.*\///; s/\.sh:/./; s/(.*//'
65
-            ;;
66
-        *)
67
-            ffood __die "unknown ffood command: $1"
68
-            ;;
69
-    esac
70
-}
71
-
72
-ffood __debug "FFOOD_DATA_DIR='$FFOOD_DATA_DIR'"
73
-ffood __debug "FFOOD_DIR='$FFOOD_DIR'"
74
-ffood __debug "FFOOD_ARTIFACTS_DIR='$FFOOD_ARTIFACTS_DIR'"
75
-ffood __debug "FFOOD_DEBUG='$FFOOD_DEBUG'"
76
-ffood __debug "FFOOD_DEBUGINIT='$FFOOD_DEBUGINIT'"
77
-ffood __debug "FFOOD_INCLUDE='$FFOOD_INCLUDE'"
78
-ffood __debug "FFOOD_INIPATH='$FFOOD_INIPATH'"
79
-ffood __debug "FFOOD_MKPRETTY='$FFOOD_MKPRETTY'"
80
-ffood __debug "FFOOD_VERBOSE='$FFOOD_VERBOSE'"
81
-ffood __debug "FFOOD_VERSION='$FFOOD_VERSION'"

+ 6
- 6
include/core.sh Ver arquivo

@@ -15,7 +15,7 @@ debug() {
15 15
     #     debug -v var1 var2 result
16 16
     #     debug -v "var@ result"
17 17
     #
18
-    $FFOOD_DEBUG || return 0
18
+    $FFOO_DEBUG || return 0
19 19
     __echo "$@"
20 20
 }
21 21
 
@@ -64,7 +64,7 @@ think() {
64 64
     # Use "-l" to split every parameter to separate line, (useful
65 65
     # or longer warnings)
66 66
     #
67
-    $FFOOD_VERBOSE || return 0
67
+    $FFOO_VERBOSE || return 0
68 68
     __echo "$@"
69 69
 }
70 70
 
@@ -107,7 +107,7 @@ __echo() {
107 107
     #               that called __echo and each argument
108 108
     #               given
109 109
     #
110
-    ffood import mkpretty_${FFOOD_MKPRETTY}
110
+    ffoo import mkpretty_${FFOO_MKPRETTY}
111 111
     local caller=${FUNCNAME[2]}
112 112
     local front=${FUNCNAME[1]}
113 113
     case "$caller" in
@@ -163,7 +163,7 @@ __echo_lines() {
163 163
 }
164 164
 
165 165
 __echo_trace() {
166
-    $FFOOD_DEBUG || return 0
166
+    $FFOO_DEBUG || return 0
167 167
     local -a tr=(${FUNCNAME[@]})
168 168
     unset tr[0]; unset tr[1]; unset tr[2];
169 169
     local tmp=$(echo "${tr[*]}" | tr '  ' '\n' | tac )
@@ -315,8 +315,8 @@ __iniread__merge() {
315 315
                 cat $arg
316 316
             ;;
317 317
         *)              # name given, find all its incarnations
318
-            debug -v FFOOD_INIPATH
319
-            echo "$FFOOD_INIPATH" \
318
+            debug -v FFOO_INIPATH
319
+            echo "$FFOO_INIPATH" \
320 320
               | tr ':' '\n' \
321 321
               | while read trydir;
322 322
                 do

+ 8
- 8
include/mkpretty_color.sh Ver arquivo

@@ -1,25 +1,25 @@
1 1
 #!/bin/bash
2 2
 
3
-ffood import termcolors
3
+ffoo import termcolors
4 4
 
5 5
 mkpretty_debug() {
6 6
     while IFS= read line;
7
-    do echo -ne "${FFOOD_TERMCOLORS_LBLUE}debug:$caller:$FFOOD_TERMCOLORS_NONE"
7
+    do echo -ne "${FFOO_TERMCOLORS_LBLUE}debug:$caller:$FFOO_TERMCOLORS_NONE"
8 8
        echo "$line"; done
9 9
 }
10 10
 
11 11
 mkpretty_die() {
12
-    echo -ne "$FFOOD_TERMCOLORS_LRED"
12
+    echo -ne "$FFOO_TERMCOLORS_LRED"
13 13
     while IFS= read line;
14 14
     do echo "$line"; done
15
-    echo -ne "$FFOOD_TERMCOLORS_NONE"
15
+    echo -ne "$FFOO_TERMCOLORS_NONE"
16 16
 }
17 17
 
18 18
 mkpretty_usage_is() {
19
-    echo -ne "$FFOOD_TERMCOLORS_YELLOW"
19
+    echo -ne "$FFOO_TERMCOLORS_YELLOW"
20 20
     while IFS= read line;
21 21
     do echo -e "$line"; done
22
-    echo -ne "$FFOOD_TERMCOLORS_NONE"
22
+    echo -ne "$FFOO_TERMCOLORS_NONE"
23 23
 }
24 24
 
25 25
 mkpretty_think() {
@@ -28,8 +28,8 @@ mkpretty_think() {
28 28
 }
29 29
 
30 30
 mkpretty_warn() {
31
-    echo -ne "$FFOOD_TERMCOLORS_LRED"
31
+    echo -ne "$FFOO_TERMCOLORS_LRED"
32 32
     while IFS= read line;
33 33
     do echo "$line"; done
34
-    echo -ne "$FFOOD_TERMCOLORS_NONE"
34
+    echo -ne "$FFOO_TERMCOLORS_NONE"
35 35
 }

+ 4
- 4
include/proj_ol.sh Ver arquivo

@@ -1,9 +1,9 @@
1 1
 #!/bin/bash
2 2
 
3
-ffood import core
4
-ffood import recon
5
-ffood import testing
6
-ffood import yummy
3
+ffoo import core
4
+ffoo import recon
5
+ffoo import testing
6
+ffoo import yummy
7 7
 
8 8
 
9 9
 OLCS_RUNHOW=$(iniread -s mk.run.how mk-ol.ini)

+ 1
- 1
include/recon.sh Ver arquivo

@@ -1,6 +1,6 @@
1 1
 #!/bin/bash
2 2
 
3
-ffood import core
3
+ffoo import core
4 4
 
5 5
 
6 6
 age_of_leaf() {

+ 2
- 2
include/sw.sh Ver arquivo

@@ -1,7 +1,7 @@
1 1
 #!/bin/bash
2 2
 
3
-ffood import core
4
-ffood import yummy
3
+ffoo import core
4
+ffoo import yummy
5 5
 
6 6
 any_install() {
7 7
     local tool pkg

+ 17
- 17
include/termcolors.sh Ver arquivo

@@ -1,17 +1,17 @@
1
-FFOOD_TERMCOLORS_BLACK="\033[0;30m"
2
-FFOOD_TERMCOLORS_RED="\033[0;31m"
3
-FFOOD_TERMCOLORS_GREEN="\033[0;32m"
4
-FFOOD_TERMCOLORS_YELLOW="\033[0;33m"
5
-FFOOD_TERMCOLORS_BLUE="\033[0;34m"
6
-FFOOD_TERMCOLORS_MAGENTA="\033[0;35m"
7
-FFOOD_TERMCOLORS_CYAN="\033[0;36m"
8
-FFOOD_TERMCOLORS_WHITE="\033[0;37m"
9
-FFOOD_TERMCOLORS_LBLACK="\033[1;30m"
10
-FFOOD_TERMCOLORS_LRED="\033[1;31m"
11
-FFOOD_TERMCOLORS_LGREEN="\033[1;32m"
12
-FFOOD_TERMCOLORS_LYELLOW="\033[1;33m"
13
-FFOOD_TERMCOLORS_LBLUE="\033[1;34m"
14
-FFOOD_TERMCOLORS_LMAGENTA="\033[1;35m"
15
-FFOOD_TERMCOLORS_LCYAN="\033[1;36m"
16
-FFOOD_TERMCOLORS_LWHITE="\033[1;37m"
17
-FFOOD_TERMCOLORS_NONE="\033[1;0m"
1
+FFOO_TERMCOLORS_BLACK="\033[0;30m"
2
+FFOO_TERMCOLORS_RED="\033[0;31m"
3
+FFOO_TERMCOLORS_GREEN="\033[0;32m"
4
+FFOO_TERMCOLORS_YELLOW="\033[0;33m"
5
+FFOO_TERMCOLORS_BLUE="\033[0;34m"
6
+FFOO_TERMCOLORS_MAGENTA="\033[0;35m"
7
+FFOO_TERMCOLORS_CYAN="\033[0;36m"
8
+FFOO_TERMCOLORS_WHITE="\033[0;37m"
9
+FFOO_TERMCOLORS_LBLACK="\033[1;30m"
10
+FFOO_TERMCOLORS_LRED="\033[1;31m"
11
+FFOO_TERMCOLORS_LGREEN="\033[1;32m"
12
+FFOO_TERMCOLORS_LYELLOW="\033[1;33m"
13
+FFOO_TERMCOLORS_LBLUE="\033[1;34m"
14
+FFOO_TERMCOLORS_LMAGENTA="\033[1;35m"
15
+FFOO_TERMCOLORS_LCYAN="\033[1;36m"
16
+FFOO_TERMCOLORS_LWHITE="\033[1;37m"
17
+FFOO_TERMCOLORS_NONE="\033[1;0m"

+ 5
- 5
include/testing.sh Ver arquivo

@@ -1,14 +1,14 @@
1 1
 #!/bin/bash
2 2
 
3
-ffood import core
3
+ffoo import core
4 4
 
5 5
 collect_artifacts() {
6 6
     local aroot="$1"
7 7
     test -n "$aroot" || usagef "target_root"
8
-    test -f $FFOOD_TMP/artifact_list || return 0
8
+    test -f $FFOO_TMP/artifact_list || return 0
9 9
     local tgt
10 10
     think "collecting artifacts to $aroot"
11
-    cat $FFOOD_TMP/artifact_list \
11
+    cat $FFOO_TMP/artifact_list \
12 12
         | while read path;
13 13
           do
14 14
               tgt=$aroot/$(dirname $path)
@@ -18,8 +18,8 @@ collect_artifacts() {
18 18
 }
19 19
 
20 20
 register_artifact() {
21
-    test -n "$FFOOD_TMP" && FFOOD_TMP=$(mktemp -d)
22
-    local list=$FFOOD_TMP/artifact_list
21
+    test -n "$FFOO_TMP" && FFOO_TMP=$(mktemp -d)
22
+    local list=$FFOO_TMP/artifact_list
23 23
     local a
24 24
     for a in "$@";
25 25
     do

+ 1
- 1
include/www.sh Ver arquivo

@@ -1,6 +1,6 @@
1 1
 #!/bin/bash
2 2
 
3
-ffood import core
3
+ffoo import core
4 4
 
5 5
 filter_exprs() {
6 6
     #

+ 1
- 1
include/xorg.sh Ver arquivo

@@ -1,6 +1,6 @@
1 1
 #!/bin/bash
2 2
 
3
-ffood import core
3
+ffoo import core
4 4
 
5 5
 clipln() {
6 6
     xclip -o -selection primary 2>/dev/null

+ 2
- 2
notes/TODO.md Ver arquivo

@@ -14,10 +14,10 @@ global/misc
14 14
 *   `__echo` -- add --source, i.e. print source of a
15 15
     particular function at runtime
16 16
 
17
-*   fix up `ffood --list-*`, current implementation is
17
+*   fix up `ffoo --list-*`, current implementation is
18 18
     scratching right ear with left hand
19 19
 
20
-*   support conflict checking in `ffood`. i.e. for TI and the likes
20
+*   support conflict checking in `ffoo`. i.e. for TI and the likes
21 21
 
22 22
 *   doc - finish `ffdoc`, add first line to function lists
23 23
 

+ 14
- 14
setup/mk.sh Ver arquivo

@@ -1,5 +1,5 @@
1 1
 #!/bin/bash
2
-# ffood - Fast Food - a Bash Library
2
+# ffoo - Fast Foo - a Bash Library
3 3
 # See LICENSE file for copyright and license details.
4 4
 
5 5
 tmp=$(mktemp)
@@ -9,8 +9,8 @@ rm -f $tmp
9 9
 
10 10
 bindir=${DESTDIR}${PREFIX}/bin
11 11
 mandir=${DESTDIR}${MANPREFIX}
12
-docdir=${DESTDIR}${PREFIX}/share/doc/ffood
13
-shrdir=${DESTDIR}${PREFIX}/share/ffood
12
+docdir=${DESTDIR}${PREFIX}/share/doc/ffoo
13
+shrdir=${DESTDIR}${PREFIX}/share/ffoo
14 14
 
15 15
 list_of_bins() {
16 16
     echo bin/ffdoc
@@ -24,11 +24,11 @@ list_of_installed_bins() {
24 24
 
25 25
 list_of_docs() {
26 26
     echo doc/fff.1.md
27
-    echo doc/ffood.3.md
27
+    echo doc/ffoo.3.md
28 28
 }
29 29
 
30 30
 list_of_shrs() {
31
-    echo ffood.sh
31
+    echo ffoo.sh
32 32
     echo include
33 33
 }
34 34
 
@@ -40,14 +40,14 @@ clean() {
40 40
 }
41 41
 
42 42
 dist() {
43
-    local dirname=ffood-${VERSION}
43
+    local dirname=ffoo-${VERSION}
44 44
     mkdir -p $dirname
45 45
     cp -R   bin \
46 46
             config.mk \
47 47
             doc \
48 48
             include \
49 49
             Makefile \
50
-            ffood.sh.in \
50
+            ffoo.sh.in \
51 51
             README \
52 52
             LICENSE \
53 53
             setup \
@@ -81,13 +81,13 @@ install_manpages() {
81 81
     test -f .autoclean && clean || :
82 82
 }
83 83
 
84
-ffood() {
84
+ffoo() {
85 85
     local srcpath dstpath
86 86
     find -type f -name '*.in' \
87 87
         | while read srcpath;
88 88
           do
89 89
               dstpath=${srcpath%.in}
90
-              perl -pe "s|__FFOOD_DIR__|$shrdir|;
90
+              perl -pe "s|__FFOO_DIR__|$shrdir|;
91 91
                         s|__VERSION__|$VERSION|;" < $srcpath > $dstpath
92 92
               echo $dstpath >> built.list
93 93
           done
@@ -105,19 +105,19 @@ run_test() {
105 105
 
106 106
 uninstall() {
107 107
     list_of_installed_bins | xargs rm -f
108
-    rm -rf $shrdir/ffood
109
-    rm -rf $docdir/ffood
108
+    rm -rf $shrdir/ffoo
109
+    rm -rf $docdir/ffoo
110 110
     rm -f $mandir/man1/fff.1
111
-    rm -f $mandir/man3/ffood.3
111
+    rm -f $mandir/man3/ffoo.3
112 112
 }
113 113
 
114 114
 case $1 in
115
-    clean|dist|install|install_manpages|manpages|ffood|uninstall)
115
+    clean|dist|install|install_manpages|manpages|ffoo|uninstall)
116 116
         $1
117 117
         ;;
118 118
     test)
119 119
         run_test
120 120
         ;;
121 121
     *)
122
-        echo "usage: $(basename $0) clean|dist|install|ffood|test|uninstall" >&2
122
+        echo "usage: $(basename $0) clean|dist|install|ffoo|test|uninstall" >&2
123 123
 esac

+ 2
- 2
test/iniread.in Ver arquivo

@@ -2,8 +2,8 @@
2 2
 
3 3
 . /usr/share/beakerlib/beakerlib.sh
4 4
 
5
-. __FFOOD_DIR__/qecc.sh
6
-ffood import core
5
+. __FFOO_DIR__/ffoo.sh
6
+ffoo import core
7 7
 
8 8
 
9 9
 do_test() {