2003-06-26 01:24:53 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
## $Id$
|
|
|
|
|
|
|
|
# Automate a clean check out, make all, check, distcheck. On error, complain
|
|
|
|
# to stdout and return 1. Suitable for a cron job.
|
|
|
|
|
2003-06-26 21:30:58 +00:00
|
|
|
# need to set PATH because we might be running from a cron job.
|
|
|
|
# on our Solaris servers, cvs is in /opt/misc/bin
|
|
|
|
PATH=/opt/misc/bin:/usr/local/bin:/usr/bin:/bin:$PATH
|
|
|
|
export PATH
|
|
|
|
|
2003-06-26 01:24:53 +00:00
|
|
|
CHECKOUT="CVSROOT=/disks/milkyway/a/users/anderson/seti/cvsroot cvs co boinc"
|
|
|
|
TMPDIR=/tmp/testbase
|
|
|
|
|
|
|
|
die()
|
|
|
|
{
|
|
|
|
echo "$1"
|
|
|
|
[ "$2" ] && cat "$2"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
reqeval()
|
|
|
|
{
|
|
|
|
eval "$1" || die "error executing: $1"
|
|
|
|
}
|
|
|
|
|
|
|
|
reqeval_log()
|
|
|
|
{
|
|
|
|
eval "$1" > $2 2>&1 || die "error executing: $1" $2
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
reqeval "rm -rf $TMPDIR"
|
|
|
|
reqeval "mkdir -p $TMPDIR"
|
|
|
|
reqeval "cd $TMPDIR"
|
|
|
|
reqeval_log "$CHECKOUT" checkout.log
|
|
|
|
reqeval "cd boinc"
|
|
|
|
reqeval_log "./configure" configure.log
|
|
|
|
reqeval_log "make all" make_all.log
|
|
|
|
reqeval_log "make check" make_check.log
|
|
|
|
reqeval_log "make distcheck" make_distcheck.log
|