#!/bin/bash # Cron script for "release". See "backend/nitemc/crontab.txt" RSYNC_DIR="/usr/local/spamassassin/automc/rsync/tagged_builds" REPO_URL="http://svn.apache.org/repos/asf/spamassassin/trunk" PERL=/usr/bin/perl SVN=/usr/bin/svn type="$1" versfile="$2" if [ -z "$type" ]; then echo "Type not specified" >&2 exit 1 fi if [ ! -f $versfile ]; then echo "Version file not specified" >&2 exit 1 fi subdir=${type}_mass_check echo "Type: $type" echo "Version File: $versfile" echo "Subdir: $subdir" REV=`tail -1 $versfile | awk '{print $2}'` echo "Revision: $REV" set -ex for retry in 1 2 3 4 5 6 7 8 9 10 ; do # export the main repo: rm -rf $RSYNC_DIR/$subdir/* $SVN export --non-interactive --force -r $REV $REPO_URL $RSYNC_DIR/$subdir/ \ || continue cd $RSYNC_DIR/$subdir $PERL build/mkrules --out rules > /dev/null || continue # create "svn info" file for mass-check $SVN info $REPO_URL > masses/svninfo.tmp \ < /dev/null || continue exit # assume success at this point done echo "FAILED to extract to rsync dir" 1>&2 exit 2