Browse Source

Use rec_built() instead of manual steps

Alois Mahdal 7 years ago
parent
commit
04ac52b348
1 changed files with 5 additions and 8 deletions
  1. 5
    8
      src/include/build.sh

+ 5
- 8
src/include/build.sh View File

17
     test -n "$ftype"    || ftype=$(_guess_ftype "$dstpath")
17
     test -n "$ftype"    || ftype=$(_guess_ftype "$dstpath")
18
     debug_var srcpath dstpath ftype
18
     debug_var srcpath dstpath ftype
19
     <"$srcpath" _build1_ftype "$ftype" >"$dstpath"
19
     <"$srcpath" _build1_ftype "$ftype" >"$dstpath"
20
-    mkdir -p "$MKIT_LOCAL"
21
-    echo "$dstpath" >> "$MKIT_LOCAL/built.lst"
20
+    rec_built "$dstpath"
22
 }
21
 }
23
 
22
 
24
 _build1_ftype() {
23
 _build1_ftype() {
137
           | while read -r manfile; do
136
           | while read -r manfile; do
138
                 mdfile="$manfile.md"
137
                 mdfile="$manfile.md"
139
                 ronn -r "$mdfile"
138
                 ronn -r "$mdfile"
140
-                mkdir -p "$MKIT_LOCAL"
141
-                echo "$manfile" >> "$MKIT_LOCAL/built.lst"
139
+                rec_built "$manfile"
142
             done
140
             done
143
     else
141
     else
144
         echo "ronn is not installed"
142
         echo "ronn is not installed"
174
     mv "${MKIT_PROJ_PKGNAME}-$version.tar.gz" \
172
     mv "${MKIT_PROJ_PKGNAME}-$version.tar.gz" \
175
        "${MKIT_PROJ_PKGNAME}_$version.orig.tar.gz" \
173
        "${MKIT_PROJ_PKGNAME}_$version.orig.tar.gz" \
176
      || die "could not rename tarball"
174
      || die "could not rename tarball"
177
-    echo "${MKIT_PROJ_PKGNAME}_$version.orig.tar.gz" >> "$MKIT_LOCAL/built.lst"
175
+    rec_built "${MKIT_PROJ_PKGNAME}_$version.orig.tar.gz"
178
 
176
 
179
     # read content of each mandatory file from debian_skel
177
     # read content of each mandatory file from debian_skel
180
     #
178
     #
188
             mkdir -p "$(dirname "$dftgt")"
186
             mkdir -p "$(dirname "$dftgt")"
189
             _build1 "$dfsrc" "$dftgt" debstuff
187
             _build1 "$dfsrc" "$dftgt" debstuff
190
         done
188
         done
191
-    echo debian >> "$MKIT_LOCAL/built.lst"
189
+    rec_built debian
192
 }
190
 }
193
 
191
 
194
 dist() {
192
 dist() {
211
     echo -n "$git_lasthash" > "$dirname/.mkit/git_lasthash"
209
     echo -n "$git_lasthash" > "$dirname/.mkit/git_lasthash"
212
     tar -cf "$dirname.tar" "$dirname"
210
     tar -cf "$dirname.tar" "$dirname"
213
     gzip -f "$dirname.tar"      # see above FIXME
211
     gzip -f "$dirname.tar"      # see above FIXME
214
-    mkdir -p "$MKIT_LOCAL"
215
-    echo "$dirname.tar.gz" >> "$MKIT_LOCAL/built.lst"
212
+    rec_built "$dirname.tar.gz"
216
     rm -rf "$dirname"
213
     rm -rf "$dirname"
217
 }
214
 }
218
 
215