1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-05-08 14:56:13 +02:00

cleanup: use package files instead of source package dotfiles

Try to build a source package if at least one binary package is missing. If
that is the case, clean up possibly built packages so we can cleanly recover
from a prior crash.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
David Oberhollenzer 2019-03-06 21:15:42 +01:00
parent 2184f4dae7
commit a9eb892920

22
mk.sh
View file

@ -89,9 +89,23 @@ done < "$PACKAGELIST"
echo "--- building packages ---"
while read pkg; do
if [ ! -e "$PKGLOGDIR/.$pkg" ]; then
include_pkg "$pkg"
found="yes"
for f in $SUBPKG; do
if [ ! -f "$REPODIR/${f}.pkg" ]; then
found="no"
break
fi
done
[ "x$found" == "xno" ] || continue;
for f in $SUBPKG; do
rm -f "$REPODIR/${f}.pkg"
done
rm -rf "$TCDIR/$TARGET" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
mkdir -p "$TCDIR/$TARGET" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
@ -105,15 +119,11 @@ while read pkg; do
strip_files ${PKGDEPLOYDIR}/{bin,lib}
for f in $SUBPKG; do
pkg pack -r "$REPODIR" \
-d "$PKGDEPLOYDIR/${f}.desc" \
pkg pack -r "$REPODIR" -d "$PKGDEPLOYDIR/${f}.desc" \
-l "$PKGDEPLOYDIR/${f}.files"
done
rm -rf "$TCDIR/$TARGET" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
touch "$PKGLOGDIR/.$pkg"
fi
done < "$PACKAGELIST"
echo "--- done ---"