BUILD_LOC="/home/data/httpd/download.eclipse.org/js4emf" # where you will have your promotion logs PROMO_LOGS_DIR="" # this script log logFile="publish_js4emf.log" # the update dir, e.g. updates-nightly updateDir=$1 rm -f $logFile echo "[`date +%Y/%m/%d\ %H:%M`]: getting last successful build" >> $logFile mkdir -p $BUILD_LOC rm -f $BUILD_LOC/site.zip rm -rf $BUILD_LOC/build cd $BUILD_LOC wget --no-check-certificate "https://hudson.eclipse.org/hudson/job/js4emf/lastSuccessfulBuild/artifact/org.eclipse.emf.js4emf.updatesite/target/site/*zip*/site.zip" -o $logFile if [ ! -f site.zip ]; then echo "ERROR:build.zip (from Hudson) not found" >> $logFile; exit -2; fi unzip site.zip >> $logFile rm -Rf $updateDir mkdir $updateDir mv -f site/* $updateDir/ echo "[`date +%Y/%m/%d\ %H:%M`]: publishing last build to $updateDir ..." >> $logFile