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() {
|
hook() {
|
||||||
type -P xdelta3 > /dev/null || return 0
|
type -P xdelta3 > /dev/null || return 0
|
||||||
|
@ -9,20 +9,18 @@ hook() {
|
||||||
|
|
||||||
if ! cmp -s "${newfile}" "${oldfile}"; then
|
if ! cmp -s "${newfile}" "${oldfile}"; then
|
||||||
newdiff="${newfile}.${chk}.vcdiff"
|
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
|
for diff in ${newfile}.*.vcdiff; do
|
||||||
[ "${diff}" = "${newdiff}" ] && continue;
|
[ "${diff}" = "${newdiff}" ] && continue;
|
||||||
cp -- "${diff}" "${diff}.tmp"
|
cp -- "${diff}" "${diff}.tmp"
|
||||||
xdelta3 -f merge -m "${diff}.tmp" "${newdiff}" "${diff}"
|
xdelta3 -q -f merge -m "${diff}.tmp" "${newdiff}" "${diff}"
|
||||||
rm -- "${diff}.tmp"
|
rm -- "${diff}.tmp"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 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 -f -e -s "${newfile}" "${newfile}" \
|
xdelta3 -q -f -e -s "${newfile}" "${newfile}" "${newfile}.${newchk}.vcdiff"
|
||||||
"${newfile}.${newchk}.vcdiff"
|
|
||||||
|
|
||||||
rm -- "${oldfile}"
|
rm -- "${oldfile}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,9 @@
|
||||||
hook() {
|
hook() {
|
||||||
type -P xdelta3 > /dev/null || return 0
|
type -P xdelta3 > /dev/null || return 0
|
||||||
|
|
||||||
env
|
|
||||||
# create links to preserve old versions of repodata
|
# create links to preserve old versions of repodata
|
||||||
find $XBPS_REPOSITORY -name "${XBPS_TARGET_MACHINE}-repodata" | while read; do
|
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"
|
cp "${REPLY}" "${REPLY}.genVcdiff"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue