X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=deblob-main;h=ce334948c0c412a4a705ddc3d0257eecf526a4e9;hb=ee7de2b53bd496eeeafaf088960762ee61720c50;hp=961243d2f08f51a53ecaa8b6c745a924f0535ce3;hpb=e58b90f3309cbc925b16995e33c924648049b304;p=releases.git diff --git a/deblob-main b/deblob-main index 961243d2f08f..ce334948c0c4 100755 --- a/deblob-main +++ b/deblob-main @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 2008, 2009 Alexandre Oliva +# Copyright (C) 2008, 2009, 2010 Alexandre Oliva # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -106,6 +106,9 @@ for f in \ linux-$kver-$libre.tar \ linux-$kver-$libre.patch \ linux-$kver-$libre.log \ + linux-$kver-$libre.vcdiff \ + linux-$kver-$libre.vcdiff.asc \ + linux-$kver-$libre.vcdiff.sign \ linux-$kver-$libre.xdelta \ linux-$kver-$libre.xdelta.asc \ linux-$kver-$libre.xdelta.sign \ @@ -126,7 +129,7 @@ for d in \ echo $d already exists >&2 exit 1 fi - cleanup="$cleanup $f" + cleanup="$cleanup $d" done if test -f $dir/deblob-$kver; then @@ -161,7 +164,7 @@ echo Uncompressing linux-$kver.tar.bz2 into linux-$kver.tar rm -rf linux-$kver linux-$kver.tar bunzip2 < linux-$kver.tar.bz2 > linux-$kver.tar -echo Extracing linux-$kver.tar into linux-$kver +echo Extracting linux-$kver.tar into linux-$kver tar -xf linux-$kver.tar rm -rf linux-$kver-$libre linux-$kver-$libre.tar @@ -171,7 +174,7 @@ cp -lR linux-$kver/. linux-$kver-$libre rm -f linux-$kver-$libre.log linux-$kver-$libre.log.tmp echo Deblobbing within linux-$kver-$libre, saving output to linux-$kver-$libre.log -# We can't just pipe deblob into tee, for then we fail to detect +# We can't just pipe deblob into tee, for then we fail to detect # error conditions. Use file renaming to tell whether we succeeded. if (cd linux-$kver-$libre && /bin/sh ../$deblob $force) 2>&1; then mv linux-$kver-$libre.log.tmp linux-$kver-$libre.log @@ -211,16 +214,26 @@ xargs tar --append -f linux-$kver-$libre.tar echo Wiping out extracted trees rm -rf linux-$kver orig-linux-$kver +echo Creating vcdiff between linux-$kver.tar and linux-$kver-$libre.tar +xdelta3 -e -R -s linux-$kver.tar linux-$kver-$libre.tar linux-$kver-$libre.xdelta || : # don't fail if xdelta3 is not present + echo Creating xdelta between linux-$kver.tar and linux-$kver-$libre.tar xdelta delta -0 linux-$kver.tar linux-$kver-$libre.tar linux-$kver-$libre.xdelta || : # xdelta returns nonzero on success -echo Compressing linux-$kver-$libre.tar and linux-$kver-$libre.xdelta +echo Compressing linux-$kver-$libre.tar and binary deltas rm -f linux-$kver.tar +bzip2 -k9 linux-$kver-$libre.tar lzip -k9 linux-$kver-$libre.tar -bzip2 -9 linux-$kver-$libre.tar +rm -f linux-$kver-$libre.tar +if test -f linux-$kver-$libre.vcdiff; then + bzip2 -k9 linux-$kver-$libre.vcdiff + lzip -k9 linux-$kver-$libre.vcdiff + rm -f linux-$kver-$libre.vcdiff +fi if test -f linux-$kver-$libre.xdelta; then + bzip2 -k9 linux-$kver-$libre.xdelta lzip -k9 linux-$kver-$libre.xdelta - bzip2 -9 linux-$kver-$libre.xdelta + rm -f linux-$kver-$libre.xdelta fi trap "status=$?; (exit $status); exit" 0 1 2 15 @@ -229,6 +242,8 @@ echo Done except for signing, feel free to interrupt for f in \ linux-$kver-$libre.tar.bz2 \ linux-$kver-$libre.tar.lz \ + linux-$kver-$libre.vcdiff.bz2 \ + linux-$kver-$libre.vcdiff.lz \ linux-$kver-$libre.xdelta.bz2 \ linux-$kver-$libre.xdelta.lz \ ; do