Browse Source

Update own dogfood

Alois Mahdal 6 years ago
parent
commit
c43cdb4238
3 changed files with 10 additions and 7 deletions
  1. 9
    5
      utils/mkit/include/build.sh
  2. 0
    1
      utils/mkit/include/ini.sh
  3. 1
    1
      utils/mkit/include/vars.sh

+ 9
- 5
utils/mkit/include/build.sh View File

47
     local line=$1   # line to process
47
     local line=$1   # line to process
48
     local mname     # macro name
48
     local mname     # macro name
49
     local mvline    # line of macro value
49
     local mvline    # line of macro value
50
+    local xline     # expanded line
51
+    xline=$line
50
     for mname in "${!MacroMap[@]}"; do
52
     for mname in "${!MacroMap[@]}"; do
51
         if ! test "${line//$mname}" == "$line"; then
53
         if ! test "${line//$mname}" == "$line"; then
52
-            while IFS= read -r mvline; do
53
-                echo "${line//$mname/$mvline}"
54
-            done <<<"${MacroMap[$mname]}"
55
-            return 0
54
+            xline=$(
55
+                while IFS= read -r mvline; do
56
+                    echo "${line//$mname/$mvline}"
57
+                done <<<"${MacroMap[$mname]}"
58
+            )
56
         fi
59
         fi
60
+        line=$xline
57
     done
61
     done
58
-    echo "$line"
62
+    echo "$xline"
59
     return 1
63
     return 1
60
 }
64
 }
61
 
65
 

+ 0
- 1
utils/mkit/include/ini.sh View File

79
     local ok=false      # are we in the section?
79
     local ok=false      # are we in the section?
80
     local line          # each input line
80
     local line          # each input line
81
     grep '.' \
81
     grep '.' \
82
-      | grep -v '\s*#' \
83
       | while read -r line; do
82
       | while read -r line; do
84
             case "$line" in
83
             case "$line" in
85
                 \[$wnt\]) ok=true;  continue ;;
84
                 \[$wnt\]) ok=true;  continue ;;

+ 1
- 1
utils/mkit/include/vars.sh View File

58
 #
58
 #
59
 # This MKit version
59
 # This MKit version
60
 #
60
 #
61
-MKIT_VERSION=0.0.29+HEAD.g0ada671
61
+MKIT_VERSION=0.0.31+master.g5676fda