summaryrefslogtreecommitdiffstats
path: root/bin/snapshot
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-07-30 19:52:24 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-07-30 19:52:24 (GMT)
commit3ed85f3f357091ce14d785e829f40698e13767e4 (patch)
tree91af3b9b36e743858ac38c98f73208e38a3ea449 /bin/snapshot
parentdcf8dbfe7fc67e3923e663fdbf767f942f11f6e2 (diff)
downloadhdf5-3ed85f3f357091ce14d785e829f40698e13767e4.zip
hdf5-3ed85f3f357091ce14d785e829f40698e13767e4.tar.gz
hdf5-3ed85f3f357091ce14d785e829f40698e13767e4.tar.bz2
[svn-r551] *** empty log message ***
Diffstat (limited to 'bin/snapshot')
-rwxr-xr-xbin/snapshot54
1 files changed, 54 insertions, 0 deletions
diff --git a/bin/snapshot b/bin/snapshot
new file mode 100755
index 0000000..42a23a6
--- /dev/null
+++ b/bin/snapshot
@@ -0,0 +1,54 @@
+#!/bin/sh
+set -x
+#
+# 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.
+#
+
+# Where are the snapshots stored?
+ARCHIVES=/hdf3/ftp/pub/outgoing/hdf5/snapshots
+if [ "$1" ]; then
+ ARCHIVES="$1"
+ shift
+fi
+
+# 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
+
+# Compare it with the previous version.
+if [ -d ${COMPARE}/previous ]; then
+ if (diff -r -I H5_VERS_RELEASE -I " release on " \
+ ${COMPARE}/previous ${COMPARE}/current >/dev/null); then
+ update=yes
+ else
+ update=no
+ fi
+else
+ update=yes
+fi
+
+# Release snapshot, update version, and commit to cvs
+if [ "$update" = "yes" ]; then
+ (cd ${COMPARE}/current; \
+ ./bin/release -d $ARCHIVES tar compress gzip bzip2; \
+ ./bin/h5vers -i; \
+ cvs -Q commit -m Snapshot )
+fi
+
+# Replace the previous version with the current version.
+rm -rf ${COMPARE}/previous
+mv ${COMPARE}/current ${COMPARE}/previous
+exit 1