# Create fresh clone of $GIT_URL from source repository in $BASEDIR/current
 
#!/bin/sh
#
# Copyright by The HDF Group.
# 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 COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
# This script should be run nightly from cron.  It checks out hdf5
# from the source repository 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 source repository.
# function definitions
TIMESTAMP()
    echo "=====" "$1": "`date`" "====="
EXIT_BANNER()
TIMESTAMP "Exit $PROGNAME with status=$?"
# Show current total disk usage.
DISKUSAGE()
    du -ks | \
    ( read x y; echo "Disk Usage=$x KB" )
# 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