echo Creating xdelta between linux-$kver.tar and linux-libre-$kver-$gnu.tar
xdelta delta -0 linux-$kver.tar linux-libre-$kver-$gnu.tar linux-libre-$kver-$gnu.xdelta || : # xdelta returns nonzero on success
+cleanup="linux-libre-$kver-$gnu.tar linux-libre-$kver-$gnu.vcdiff linux-libre-$kver-$gnu.xdelta"
+
echo Compressing binary deltas and linux-libre-$kver-$gnu.tar
rm -f linux-$kver.tar
if test -f linux-libre-$kver-$gnu.vcdiff; then
bzip2 -k9 linux-libre-$kver-$gnu.vcdiff
xz -k9 linux-libre-$kver-$gnu.vcdiff || :
lzip -k9 linux-libre-$kver-$gnu.vcdiff || :
- rm -f linux-libre-$kver-$gnu.vcdiff
fi
if test -f linux-libre-$kver-$gnu.xdelta; then
bzip2 -k9 linux-libre-$kver-$gnu.xdelta
xz -k9 linux-libre-$kver-$gnu.xdelta || :
lzip -k9 linux-libre-$kver-$gnu.xdelta || :
- rm -f linux-libre-$kver-$gnu.xdelta
fi
bzip2 -k9 linux-libre-$kver-$gnu.tar
xz -k9 linux-libre-$kver-$gnu.tar || :
lzip -k9 linux-libre-$kver-$gnu.tar || :
-cleanup=linux-libre-$kver-$gnu.tar
-
echo Done except for signing, feel free to interrupt
for f in \
linux-libre-$kver-$gnu.tar \
linux-libre-$kver-$gnu.tar.bz2 \
linux-libre-$kver-$gnu.tar.xz \
linux-libre-$kver-$gnu.tar.lz \
+ linux-libre-$kver-$gnu.vcdiff \
linux-libre-$kver-$gnu.vcdiff.bz2 \
linux-libre-$kver-$gnu.vcdiff.xz \
linux-libre-$kver-$gnu.vcdiff.lz \
+ linux-libre-$kver-$gnu.xdelta \
linux-libre-$kver-$gnu.xdelta.bz2 \
linux-libre-$kver-$gnu.xdelta.xz \
linux-libre-$kver-$gnu.xdelta.lz \
fi
done
-rm -f linux-libre-$kver-$gnu.tar
-
+rm -f $cleanup
cleanup=
trap 'status=$?; (exit $status); exit' 0 1 2 15