#!/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 cd src ant -f PCTB.xml cd .. 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/download/jpctb}" revision=`git describe --always` echo " Install with: RSYNC_RSH=ssh rsync -vP $files $pubbase:$pubdir/$revision/ "