Explorar el Código

Make use of debug*() routines

Alois Mahdal hace 9 años
padre
commit
d188315a09
Se han modificado 2 ficheros con 5 adiciones y 1 borrados
  1. 3
    0
      src/include/build.sh
  2. 2
    1
      src/include/deploy.sh

+ 3
- 0
src/include/build.sh Ver fichero

@@ -24,6 +24,7 @@ build1() {
24 24
     local ftype="$3"
25 25
     test -n "$dstpath"  || dstpath=${srcpath%.skel}
26 26
     test -n "$ftype"    || ftype=$(guess_ftype "$dstpath")
27
+    debug_var srcpath dstpath ftype
27 28
     <"$srcpath" build1_ftype "$ftype" >"$dstpath"
28 29
     mkdir -p "$MKIT_LOCAL"
29 30
     echo "$dstpath" >> "$MKIT_LOCAL/built.lst"
@@ -146,11 +147,13 @@ expand_variables() {
146 147
     local section varname varvalue
147 148
     for section in "$@";
148 149
     do
150
+        debug_var section
149 151
         ini lskeys "$section" \
150 152
           | while read varname;
151 153
             do
152 154
                 varvalue="$(ini 1value "$section:$varname" | sed -e 's/\$/\\$/' )"
153 155
                 echo "s|$varname|$varvalue|;" >> "$script"
156
+                debug_var varname varvalue
154 157
             done
155 158
     done
156 159
     echo "s|__CODENAME__|$CODENAME|;"     >> "$script"

+ 2
- 1
src/include/deploy.sh Ver fichero

@@ -4,8 +4,9 @@ _maybe() {
4 4
     #
5 5
     # Call the deploy command $1 $@ unless in dry mode
6 6
     #
7
+    debug "$@"
7 8
     local cmd="$1"; shift
8
-    $MKIT_DRY && echo "MKIT_DRY: $cmd" "$@" && return
9
+    $MKIT_DRY && return
9 10
     case "$cmd" in
10 11
         cp|rm|rmdir|chmod|mkdir) $cmd "$@" ;;
11 12
         install)                 command -p install "$@" ;;