X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;ds=sidebyside;f=build-sh;fp=build-sh;h=eb3d1e2e2da1e38324cfa60e0ddfcc96b3670839;hb=21094459ba3d050f011c0c7d7dff52ab488526c4;hp=0000000000000000000000000000000000000000;hpb=9e29f745ef3385e4bcb371b99465ddee0f107711;p=jarrg-owen.git diff --git a/build-sh b/build-sh new file mode 100755 index 0000000..eb3d1e2 --- /dev/null +++ b/build-sh @@ -0,0 +1,40 @@ +#!/bin/bash +# +# We don't supply a Makefile. Instead, we just supply this shell script. + +set -e + +case "$#.$1" in +0) ;; +*.-*) echo >&2 'no options allowed'; exit 1;; +*) echo >&2 'no arguments allowed'; exit 1;; +esac + +: ${JAVA_HOME:=/usr/lib/jvm/java-6-sun} +export JAVA_HOME + +(set -e; cd src; ant -f PCTB.xml) + +echo " +Building tarball +" + +GZIP=-9v tar --exclude=\*{~,.tar.gz,.exe} --exclude='#*#' \ + --transform='s/^./jpctb/' --exclude=jpctb/{src/build,tmp} \ + -zcf jpctb.tar.gz . + +files='jpctb.tar.gz jpctb-setup.exe' + +echo " +Generated OK: +" +ls -al $files + +pubbase="${JPCTB_PUBLISH_BASE-login.chiark.greenend.org.uk}" +pubdir="${JPCTB_PUBLISH_DIR-/home/yarrgweb/public-html/jpctb}" +revision=`git describe --always` + +echo " +Install with: + RSYNC_RSH=ssh rsync -vP $files $pubbase:$pubdir/$revision/ +"