#!/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. # CHECKVAL=check # 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 # Dump environment variables echo ===Dumping environment variables=== printenv | sort echo ===Done Dumping environment variables=== # 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? (md5 does checksum). METHODS="gzip bzip2 md5 doc" # 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="" ;; deploy) # deploy the built binary. shift if [ $# -lt 1 ]; then echo "deploy missing" errcode=1 cmd="help" break fi cmddeploy="deploy" DEPLOYDIRNAME="$1" ;; deploydir) # default directory for deployment. shift if [ $# -lt 1 ]; then echo "deploydir missing" errcode=1 cmd="help" break fi deploydir="$1" ;; test) cmdtest="test" cmd="" ;; setenv) # set environment variable shift eval $1="$2" export $1 shift ;; setenvN) # set environment variable with $1 values # e.g., setenvN 3 x a b c is same as setenv x="a b c". # a kludge now--the extra single quotes are needed # else eval complains. shift envN=$1 shift envname=$1 envalue= while test $envN -gt 0; do shift envalue="$envalue $1" envN=`expr $envN - 1` done eval $envname="'$envalue'" export $envname ;; 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" ;; check-vfd) CHECKVAL=check-vfd ;; 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 <] [deploydir ] [zlib ] [archive ] [srcdirname ] [op-configure