10 echo 'Usage: ./configure-version [--update | --clean]'
15 declare -r cpy=lib/bup/_checkout.py
18 hash=$(git log -1 --pretty=format:%H)
19 date=$(git log -1 --pretty=format:%ci)
20 desc=$(git describe --always --match="[0-9]*")
21 cat > $cpy.tmp-$$ <<-EOF
26 if ! test -e $cpy || ! cmp -s $cpy $cpy.tmp-$$; then
32 if test "$#" -ne 1; then
36 if ! test -f lib/bup/bupsplit.c; then
37 echo 'error: cannot find bup source tree' 1>&2
44 grep -q -F '$Format' lib/bup/_release.py || rc=$?
48 1) if test -d .git; then
49 echo 'error: detected release, but found ./.git' 1>&2
52 echo "Detected release tree; skipping version configuration" 1>&2
56 echo 'error: grep failed' 1>&2
61 rm -f lib/bup/_checkout.py lib/bup/_checkout.pyc lib/bup/_checkout.py.tmp-*