common/hooks: enable repackaging of indexes for xdelta

This commit is contained in:
Enno Boland 2014-08-12 08:28:43 +02:00
parent b713c62413
commit 27e96f018b
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ hook() {
if ! cmp -s "${newfile}" "${oldfile}"; then if ! cmp -s "${newfile}" "${oldfile}"; then
newdiff="${newfile}.${chk}.vcdiff" newdiff="${newfile}.${chk}.vcdiff"
xdelta3 -D -R -f -e -s "${oldfile}" "${newfile}" "${newdiff}" xdelta3 -f -e -s "${oldfile}" "${newfile}" "${newdiff}"
for diff in ${newfile}.*.vcdiff; do for diff in ${newfile}.*.vcdiff; do
[ "${diff}" = "${newdiff}" ] && continue; [ "${diff}" = "${newdiff}" ] && continue;
cp -- "${diff}" "${diff}.tmp" cp -- "${diff}" "${diff}.tmp"
@ -21,7 +21,7 @@ hook() {
# generate an empty diff to the new file # generate an empty diff to the new file
newchk=`sha256sum ${newfile} | awk '{ print $1 }'` newchk=`sha256sum ${newfile} | awk '{ print $1 }'`
xdelta3 -D -R -f -e -s "${newfile}" "${newfile}" \ xdelta3 -f -e -s "${newfile}" "${newfile}" \
"${newfile}.${newchk}.vcdiff" "${newfile}.${newchk}.vcdiff"
rm -- "${oldfile}" rm -- "${oldfile}"