X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=build-sh;h=9bef7b3c7d78cd7b9459bc9023f999f6195ef864;hb=refs%2Fheads%2Funstable;hp=eb3d1e2e2da1e38324cfa60e0ddfcc96b3670839;hpb=21094459ba3d050f011c0c7d7dff52ab488526c4;p=jarrg-ian.git diff --git a/build-sh b/build-sh index eb3d1e2..9bef7b3 100755 --- a/build-sh +++ b/build-sh @@ -5,7 +5,7 @@ set -e case "$#.$1" in -0) ;; +0.) ;; *.-*) echo >&2 'no options allowed'; exit 1;; *) echo >&2 'no arguments allowed'; exit 1;; esac @@ -13,28 +13,55 @@ esac : ${JAVA_HOME:=/usr/lib/jvm/java-6-sun} export JAVA_HOME -(set -e; cd src; ant -f PCTB.xml) +revision=`git describe --always || echo '(unknown revision)'` +if [ x"`git diff 2>/dev/null || echo x`" != x ]; then + revision="$revision-local" +fi + +cat >src/net/chiark/yarrg/Version.java <