void-packages/common/hooks/pre-pkg/01-xdelta_repolist.sh

12 lines
393 B
Bash

# this hook marks files which are about to change for generating vcdiffs
hook() {
[ -z "$XBPS_REPO_DELTAS" ] && return 0
type -P xdelta3 > /dev/null || return 0
# create links to preserve old versions of repodata
find $XBPS_REPOSITORY -name "${XBPS_TARGET_MACHINE}-repodata" | while read; do
( rm "${REPLY}.genVcdiff" 2>/dev/null ) || true
cp "${REPLY}" "${REPLY}.genVcdiff"
done
}