#!/bin/sh
#
# Copyright by the Board of Trustees of the University of Illinois.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the files COPYING and Copyright.html. COPYING can be found at the root
# of the source code distribution tree; Copyright.html can be found at the
# root level of an installed copy of the electronic HDF5 document set and
# is linked from the top-level documents page. It can also be found at
# http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have
# access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
# This script should be run nightly from cron. It checks out hdf5
# from the CVS source tree and compares it against the previous
# snapshot. If anything significant changed then a new snapshot is
# created, the minor version number is incremented, and the change is
# checked back into the CVS repository.
#
# function definitions
TIMESTAMP()
{
echo "=====" "$1": "`date`" "====="
}
EXIT_BANNER()
{
TIMESTAMP "Exit $PROGNAME with status=$?"
}
# MAIN
# SGI /bin/sh replaces $0 as function name if used in a function.
# Set the name here to avoid that ambiguity and better style too.
PROGNAME=$0
echo "====================================="
echo "$PROGNAME $*"
echo "====================================="
TIMESTAMP MAIN
uname -a
# setup exit banner message
trap EXIT_BANNER 0
# The path isn't properly initialized on hawkwind -- /usr/local/bin is
# either missing or is after /usr/bin when it should be before.
PATH="/usr/local/bin:$PATH"
# Where are the snapshots stored?
ARCHIVES_default=/afs/ncsa/ftp/HDF/pub/outgoing/hdf5/snapshots
ARCHIVES=$ARCHIVES_default
# Where is the zlib library?
# At NCSA, half of the machines have it in /usr/lib, the other half at
# /usr/ncsa/lib. Leave it unset.
ZLIB_default=
ZLIB=$ZLIB_default
# What compression methods to use?
METHODS="gzip bzip2"
# Use User's MAKE if set. Else use generic make.
MAKE=${MAKE:-make}
#
# Command options
cmd="all"
test_opt=""
errcode=0
while [ $# -gt 0 ] ; do
case "$1" in
all)
cmd="all"
;;
checkout)
cmdcheckout="checkout"
cmd=""
;;
diff)
cmddiff="diff"
cmd=""
;;
test)
cmdtest="test"
cmd=""
;;
srcdir)
#use srcdir option for test
srcdir="yes"
;;
srcdirname)
shift
if [ $# -lt 1 ]; then
echo "srcdirname
missing"
errcode=1
cmd="help"
break
fi
SRCDIRNAME="$1"
;;
release)
cmdrel="release"
cmd=""
;;
clean | distclean)
cmdclean="$1"
cmd=""
;;
help)
cmd="help"
break
;;
echo)
set -x
break
;;
zlib)
shift
if [ $# -lt 1 ]; then
echo "ZLIB information missing"
errcode=1
cmd="help"
break
fi
ZLIB="$1"
;;
archive)
shift
if [ $# -lt 1 ]; then
echo "Archive pathname missing"
errcode=1
cmd="help"
break
fi
ARCHIVES="$1"
;;
--*)
OP_CONFIGURE="$OP_CONFIGURE $1"
;;
op-configure)
shift
if [ $# -lt 1 ]; then
echo "op-configure option missing"
errcode=1
cmd="help"
break
fi
OP_CONFIGURE="$OP_CONFIGURE $1"
;;
*)
echo "Unkown option $1"
errcode=1
cmd="help"
break
;;
esac
shift
done
if [ "$cmd" = help ]; then
set -
cat <] [archive ] [dir ]
[op-configure