aboutsummaryrefslogtreecommitdiffstats
path: root/rebuild-alpine.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rebuild-alpine.sh')
-rwxr-xr-xrebuild-alpine.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/rebuild-alpine.sh b/rebuild-alpine.sh
index 20756bd9a5..b5d72f92bb 100755
--- a/rebuild-alpine.sh
+++ b/rebuild-alpine.sh
@@ -26,9 +26,14 @@ build () {
pkgno=$(expr "$pkgno" + 1)
echo "Building $p ($pkgno of $pktcnt in $1 - $failed failed)"
cd $rootdir/$1/$p
+ if [ -n "$debug" ] ; then
+ apk info | sort > $rootdir/packages.$1.$pkgno.$p.before
+ fi
abuild -rm > $rootdir/$1_$p.txt 2>&1
if [ "$?" = "0" ] ; then
- rm $rootdir/$1_$p.txt
+ if [ -z "$debug" ] ; then
+ rm $rootdir/$1_$p.txt
+ fi
else
echo "Package $1/$p failed to build (output in $rootdir/$1_$p.txt)"
if [ -n "$mail" ] ; then
@@ -46,6 +51,9 @@ build () {
fi
failed=$(expr "$failed" + 1)
fi
+ if [ -n "$debug" ] ; then
+ apk info | sort > $rootdir/packages.$1.$pkgno.$p.after
+ fi
done
cd $rootdir
}
@@ -54,10 +62,11 @@ touch START_OF_BUILD.txt
unset clean
unset mail
-while getopts "cm" opt; do
+while getopts "cmd" opt; do
case $opt in
'c') clean="--clean";;
'm') mail="--mail";;
+ 'd') debug="--debug";;
esac
done