hooks/xdelta: use silent output; those warnings are too noisy.
This commit is contained in:
parent
5077750c05
commit
234a4fd685
|
@ -1,4 +1,4 @@
|
|||
# This hook generates vcdiffs
|
||||
# This hook generates vcdiffs for repository data.
|
||||
|
||||
hook() {
|
||||
type -P xdelta3 > /dev/null || return 0
|
||||
|
@ -9,20 +9,18 @@ hook() {
|
|||
|
||||
if ! cmp -s "${newfile}" "${oldfile}"; then
|
||||
newdiff="${newfile}.${chk}.vcdiff"
|
||||
xdelta3 -f -e -s "${oldfile}" "${newfile}" "${newdiff}"
|
||||
xdelta3 -q -f -e -s "${oldfile}" "${newfile}" "${newdiff}"
|
||||
for diff in ${newfile}.*.vcdiff; do
|
||||
[ "${diff}" = "${newdiff}" ] && continue;
|
||||
cp -- "${diff}" "${diff}.tmp"
|
||||
xdelta3 -f merge -m "${diff}.tmp" "${newdiff}" "${diff}"
|
||||
xdelta3 -q -f merge -m "${diff}.tmp" "${newdiff}" "${diff}"
|
||||
rm -- "${diff}.tmp"
|
||||
done
|
||||
fi
|
||||
|
||||
# generate an empty diff to the new file
|
||||
newchk=`sha256sum ${newfile} | awk '{ print $1 }'`
|
||||
xdelta3 -f -e -s "${newfile}" "${newfile}" \
|
||||
"${newfile}.${newchk}.vcdiff"
|
||||
|
||||
xdelta3 -q -f -e -s "${newfile}" "${newfile}" "${newfile}.${newchk}.vcdiff"
|
||||
rm -- "${oldfile}"
|
||||
done
|
||||
}
|
||||
|
|
|
@ -3,10 +3,9 @@
|
|||
hook() {
|
||||
type -P xdelta3 > /dev/null || return 0
|
||||
|
||||
env
|
||||
# create links to preserve old versions of repodata
|
||||
find $XBPS_REPOSITORY -name "${XBPS_TARGET_MACHINE}-repodata" | while read; do
|
||||
rm "${REPLY}.genVcdiff" || true
|
||||
( rm "${REPLY}.genVcdiff" 2>/dev/null ) || true
|
||||
cp "${REPLY}" "${REPLY}.genVcdiff"
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue