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

13 lines
393 B
Bash
Raw Normal View History

# this hook marks files which are about to change for generating vcdiffs
hook() {
[ -z "$XBPS_REPO_DELTAS" ] && return 0
2014-08-13 19:59:20 +00:00
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
2014-08-13 20:21:03 +00:00
cp "${REPLY}" "${REPLY}.genVcdiff"
2014-08-13 19:59:20 +00:00
done
}