common/hooks: add support for vcdiff creation

This commit is contained in:
Enno Boland 2014-08-11 18:05:13 +02:00
parent 19332495b8
commit f4544b82a6
3 changed files with 37 additions and 1 deletions

View file

@ -0,0 +1,11 @@
# this hook marks files which are about to change for generating vcdiffs
hook() {
[ -z "$XBPS_GENERATE_VCDIFF" ] && return 0;
# create links to preserve old versions of repodata
find $XBPS_REPOSITORY -name '*-repodata' | \
while read; do
ln "${REPLY}" "${REPLY}.genVcdiff"
done
}