1998-07-31 03:52:24 +08:00
|
|
|
#!/bin/sh
|
|
|
|
set -x
|
1998-08-06 06:22:59 +08:00
|
|
|
date
|
1998-07-31 03:52:24 +08:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
1998-08-14 04:17:47 +08:00
|
|
|
# The path isn't properly initialized on hawkwind -- /usr/local/bin is
|
|
|
|
# either missing or is after /usr/bin when it should be before.
|
|
|
|
$ENV{PATH} = "/usr/local/bin:" . $ENV{PATH};
|
|
|
|
|
1998-07-31 03:52:24 +08:00
|
|
|
# Where are the snapshots stored?
|
|
|
|
ARCHIVES=/hdf3/ftp/pub/outgoing/hdf5/snapshots
|
|
|
|
if [ "$1" ]; then
|
|
|
|
ARCHIVES="$1"
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
1998-07-31 04:24:10 +08:00
|
|
|
# What compression methods to use?
|
|
|
|
METHODS="gzip bzip2"
|
|
|
|
|
1998-07-31 03:52:24 +08:00
|
|
|
# Create a working directory. Hopefully one is left over from last
|
|
|
|
# time that still has the contents of the previous release. But if
|
|
|
|
# not, just create one and assume that a snapshot is necessary.
|
|
|
|
COMPARE=${HOME}/hdf5-snapshots
|
|
|
|
test -d ${COMPARE} || mkdir -p ${COMPARE} || exit 1
|
|
|
|
|
|
|
|
# Check out the current version from CVS
|
|
|
|
if [ -z "$CVSROOT" ]; then
|
|
|
|
echo "Where is the CVS repository?" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
cvs -Q co -d ${COMPARE}/current hdf5 || exit 1
|
|
|
|
|
1998-08-11 02:15:14 +08:00
|
|
|
# Compare it with the previous version. Compare only files listed in
|
|
|
|
# the MANIFEST plus the MANIFEST itself.
|
1998-08-14 04:17:47 +08:00
|
|
|
snapshot=yes
|
1998-07-31 03:52:24 +08:00
|
|
|
if [ -d ${COMPARE}/previous ]; then
|
1998-08-14 04:17:47 +08:00
|
|
|
if (diff -c ${COMPARE}/previous/MANIFEST ${COMPARE}/current/MANIFEST); then
|
1998-08-11 02:15:14 +08:00
|
|
|
for src in `cat ${COMPARE}/current/MANIFEST`; do
|
|
|
|
if (diff -I H5_VERS_RELEASE -I " released on " \
|
1998-08-14 04:17:47 +08:00
|
|
|
${COMPARE}/previous/$src ${COMPARE}/current/$src); then
|
1998-08-11 02:15:14 +08:00
|
|
|
else
|
|
|
|
snapshot=yes
|
1998-08-14 04:17:47 +08:00
|
|
|
# Don't break because we want to see all the diffs.
|
|
|
|
#break
|
1998-08-11 02:15:14 +08:00
|
|
|
fi
|
|
|
|
done
|
1998-07-31 03:52:24 +08:00
|
|
|
fi
|
1998-08-11 02:15:14 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Make sure all the serial tests work.
|
|
|
|
if [ "$snapshot" = "yes" ]; then
|
1998-08-14 04:17:47 +08:00
|
|
|
if (cd ${COMPARE}/current; cp -p Makefile.dist Makefile; make _test); then
|
1998-08-11 02:15:14 +08:00
|
|
|
:
|
|
|
|
else
|
|
|
|
snapshot=no
|
|
|
|
fi
|
|
|
|
(cd ${COMPARE}/current; make distclean)
|
1998-07-31 03:52:24 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Release snapshot, update version, and commit to cvs
|
1998-08-11 02:15:14 +08:00
|
|
|
if [ "$snapshot" = "yes" ]; then
|
|
|
|
(
|
|
|
|
cd ${COMPARE}/current
|
|
|
|
./bin/release -d $ARCHIVES $METHODS
|
|
|
|
./bin/h5vers -i
|
|
|
|
cvs -Q commit -m Snapshot
|
|
|
|
)
|
1998-07-31 03:52:24 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Replace the previous version with the current version.
|
|
|
|
rm -rf ${COMPARE}/previous
|
|
|
|
mv ${COMPARE}/current ${COMPARE}/previous
|
1998-07-31 04:15:13 +08:00
|
|
|
exit 0
|