#!/bin/bash -vx export JAVA_HOME=$HOME/local/jdk TRUNK=http://svn.apache.org/repos/asf/lucene/nutch/trunk REL_SERVER=people.apache.org REL_DIR=/www/people.apache.org/builds/lucene/nutch/nightly # create an empty build directory rm -rf /tmp/nutch-nightly cd /tmp # export sources into it $HOME/bin/svn export $TRUNK nutch-nightly # run build cd nutch-nightly $HOME/bin/ant \ -propertyfile $HOME/nutch-nightly/nightly.properties \ -logger org.apache.tools.ant.listener.MailLogger \ -Dversion=nightly nightly # release it scp build/*.tar.gz $REL_SERVER:$REL_DIR/nutch-`/bin/date +%F`.tar.gz # remove all but five newest builds ssh $REL_SERVER rm `ssh $REL_SERVER find $REL_DIR -type f | sort -r | tail +5`