Browse Source

Make use of debug*() routines

Alois Mahdal 9 years ago
parent
commit
d188315a09
2 changed files with 5 additions and 1 deletions
  1. 3
    0
      src/include/build.sh
  2. 2
    1
      src/include/deploy.sh

+ 3
- 0
src/include/build.sh View File

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

+ 2
- 1
src/include/deploy.sh View File

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