11#! /bin/sh
22
3+ if [ ! $( git rev-parse --symbolic-full-name HEAD) = refs/heads/master ]; then
4+ exit 0
5+ fi
6+
37# These are the locations I keep my temporary source and build trees in
48TMPDIR=$HOME /Products/ledger-pre-commit
59MIRROR=$HOME /Products/ledger-pre-commit-mirror
@@ -17,19 +21,23 @@ git diff-index --cached --name-only --diff-filter=D -z HEAD | \
1721# Copy only _changed files_ from MIRROR to TMPDIR, without copying timestamps.
1822# This includes copying over new files, and deleting removed ones. This way,
1923# "make check" will only rebuild what is necessary to validate the commit.
20- rsync -rlpgoDO --size-only --delete \
21- --exclude-from=tools/excludes $MIRROR / $TMPDIR /
24+ rsync -rlpgoDOc --delete --exclude-from=tools/excludes $MIRROR / $TMPDIR /
2225
2326# Everything else happens in the temporary build tree
27+ if [ ! -f $TMPDIR /lib/utfcpp/source/utf8.h ]; then
28+ rsync -a --delete lib/utfcpp/ $TMPDIR /lib/utfcpp/
29+ fi
2430cd $TMPDIR
2531
2632# Make sure there is a current Makefile. Regeneration of Makefile happens
2733# automatically, but if myacprep or acprep changes, we want to regenerate
2834# everything manually. If the user doesn't have acprep or myacprep, look for
2935# other common autoconf-related script files.
3036if [ ! -f Makefile -o \
31- \( -f tools/myacprep -a -f acprep -a \
32- \( tools/myacprep -nt Makefile -o acprep -nt Makefile \) \) ]
37+ Makefile.am -nt Makefile -o \
38+ configure.ac -nt Makefile -o \
39+ \( -f acprep -a acprep -nt Makefile \) -o \
40+ \( -f tools/myacprep -a tools/myacprep -nt Makefile \) ]
3341then
3442 if [ -f tools/myacprep ]; then
3543 tools/myacprep --local
0 commit comments