1998-07-31 03:26:54 +08:00
|
|
|
#!/bin/sh
|
1998-01-30 00:31:24 +08:00
|
|
|
|
1998-07-31 03:26:54 +08:00
|
|
|
# Make a release of hdf5. The command-line switches are:
|
1998-01-30 00:31:24 +08:00
|
|
|
#
|
1998-07-31 03:26:54 +08:00
|
|
|
# -d DIR The name of the directory where the releas(es) should be
|
|
|
|
# placed. By default, the directory is ./releases
|
1999-06-02 21:59:35 +08:00
|
|
|
#
|
|
|
|
# --nocheck Ignore errors in MANIFEST file.
|
1998-07-31 03:26:54 +08:00
|
|
|
#
|
|
|
|
# The other command-line options are the names of the programs to use
|
|
|
|
# for compressing the resulting tar archive (if none are given then
|
|
|
|
# `tar' is assumed):
|
1998-01-30 00:31:24 +08:00
|
|
|
#
|
1998-07-31 03:26:54 +08:00
|
|
|
# tar -- use tar and don't do any compressing.
|
|
|
|
# compress -- use compress and append `.Z' to the output name.
|
|
|
|
# gzip -- use gzip with `-9' and append `.gz' to the output name.
|
|
|
|
# bzip2 -- use bzip2 with `-9' and append `.bz2' to the output name.
|
1998-01-30 00:31:24 +08:00
|
|
|
#
|
1998-07-31 03:26:54 +08:00
|
|
|
# Examples:
|
1998-01-30 00:31:24 +08:00
|
|
|
#
|
1998-07-31 03:26:54 +08:00
|
|
|
# $ release
|
|
|
|
# releases/hdf5-1.0.38.tar
|
1998-02-11 00:39:47 +08:00
|
|
|
#
|
1998-07-31 03:26:54 +08:00
|
|
|
# $ release gzip
|
|
|
|
# releases/hdf5-1.0.38.tar.gz
|
|
|
|
#
|
|
|
|
# $ release -d /tmp tar compress gzip bzip2
|
|
|
|
# /tmp/hdf5-1.0.38.tar
|
|
|
|
# /tmp/hdf5-1.0.38.tar.Z
|
|
|
|
# /tmp/hdf5-1.0.38.tar.gz
|
|
|
|
# /tmp/hdf5-1.0.38.tar.bz2
|
1998-01-30 00:31:24 +08:00
|
|
|
#
|
1999-07-20 03:56:18 +08:00
|
|
|
# Modifications
|
|
|
|
# Robb Matzke, 1999-07-16
|
|
|
|
# The SunOS 5.6 sed *must* have slashes as delimiters. I changed things like
|
|
|
|
# `sed s+/CVS++' to `sed 's/\/CVS//'
|
1999-10-27 03:30:08 +08:00
|
|
|
#
|
|
|
|
# Albert Cheng, 1999-10-26
|
|
|
|
# Moved the MANIFEST checking to a separate command file so that
|
|
|
|
# it can be invoked individually.
|
1998-01-30 00:31:24 +08:00
|
|
|
|
1998-07-31 03:26:54 +08:00
|
|
|
# Defaults
|
|
|
|
DEST=releases
|
1999-01-07 19:37:42 +08:00
|
|
|
VERS=`perl bin/h5vers`
|
1998-07-31 03:26:54 +08:00
|
|
|
test "$VERS" || exit 1
|
|
|
|
verbose=yes
|
1999-06-02 21:59:35 +08:00
|
|
|
check=yes
|
1998-07-31 03:26:54 +08:00
|
|
|
|
|
|
|
# Command-line arguments
|
1999-06-02 21:59:35 +08:00
|
|
|
while [ -n "$1" ]; do
|
|
|
|
arg=$1
|
1998-07-31 03:26:54 +08:00
|
|
|
shift
|
1999-06-02 21:59:35 +08:00
|
|
|
case "$arg" in
|
|
|
|
-d)
|
|
|
|
DEST=$1
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
--nocheck)
|
|
|
|
check=no
|
|
|
|
;;
|
|
|
|
-*)
|
|
|
|
echo "Unknown switch: $arg" 1>&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
methods="$methods $arg"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
# Default method is tar
|
1998-07-31 03:26:54 +08:00
|
|
|
if [ "X$methods" = "X" ]; then
|
|
|
|
methods=tar
|
|
|
|
fi
|
1999-06-02 21:59:35 +08:00
|
|
|
|
|
|
|
|
1998-07-31 03:26:54 +08:00
|
|
|
test "$verbose" && echo "Releasing hdf5-$VERS to $DEST" 1>&2
|
|
|
|
if [ ! -d $DEST ]; then
|
|
|
|
echo " Destination directory $DEST does not exist" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
1999-10-27 03:30:08 +08:00
|
|
|
# Check the validity of the MANIFEST file.
|
|
|
|
bin/chkmanifest || fail=yes
|
1998-07-31 03:26:54 +08:00
|
|
|
if [ "X$fail" = "Xyes" ]; then
|
1999-06-02 21:59:35 +08:00
|
|
|
if [ $check = yes ]; then
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo "Continuing anyway..."
|
|
|
|
fi
|
1998-07-31 03:26:54 +08:00
|
|
|
fi
|
1998-09-08 21:38:29 +08:00
|
|
|
|
|
|
|
# Create a manifest that contains only files for distribution.
|
1999-10-27 03:30:08 +08:00
|
|
|
MANIFEST=/tmp/H5_MANIFEST.$$
|
1998-09-08 21:38:29 +08:00
|
|
|
grep '^\.' MANIFEST | grep -v _DO_NOT_DISTRIBUTE_ >$MANIFEST
|
|
|
|
|
1998-07-31 03:26:54 +08:00
|
|
|
# Prepare the source tree for a release.
|
|
|
|
test -h ../hdf5-$VERS && rm ../hdf5-$VERS
|
1998-07-31 03:48:20 +08:00
|
|
|
ln -s `pwd` ../hdf5-$VERS || exit 1
|
1998-07-31 03:26:54 +08:00
|
|
|
mv Makefile ../Makefile.x 2>/dev/null #might fail
|
|
|
|
cp -p Makefile.dist Makefile
|
2001-05-10 23:02:00 +08:00
|
|
|
|
2001-07-06 13:43:38 +08:00
|
|
|
# Update README.txt and release_docs/RELEASE.txt with release information.
|
|
|
|
for f in README.txt release_docs/RELEASE.txt; do
|
|
|
|
echo "HDF5 version $VERS released on `date`" >$f.x
|
|
|
|
tail +2l $f >>$f.x
|
|
|
|
mv $f.x $f
|
|
|
|
# Make sure new files are of the right access mode
|
|
|
|
chmod 644 $f
|
|
|
|
done
|
|
|
|
|
|
|
|
# synchronize the HISTORY.tx and RELEASE.tx files in the doc area
|
|
|
|
cp release_docs/HISTORY.txt release_docs/RELEASE.txt doc/html/ADGuide/.
|
2001-05-10 23:02:00 +08:00
|
|
|
|
|
|
|
# Create the tar file
|
1998-07-31 03:26:54 +08:00
|
|
|
test "$verbose" && echo " Running tar..." 1>&2
|
1998-08-06 06:22:59 +08:00
|
|
|
( \
|
|
|
|
cd ..; \
|
|
|
|
tar cf x.tar hdf5-$VERS/Makefile \
|
1999-07-20 03:56:18 +08:00
|
|
|
`sed 's/^\.\//hdf5-'$VERS'\//' $MANIFEST` || exit 1 \
|
1998-08-06 06:22:59 +08:00
|
|
|
)
|
1998-07-31 03:26:54 +08:00
|
|
|
|
|
|
|
# Compress
|
|
|
|
for comp in $methods; do
|
|
|
|
case $comp in
|
|
|
|
tar)
|
|
|
|
cp -p ../x.tar $DEST/hdf5-$VERS.tar;;
|
|
|
|
compress)
|
|
|
|
test "$verbose" && echo " Running compress..." 1>&2
|
|
|
|
compress -c <../x.tar >$DEST/hdf5-$VERS.tar.Z;;
|
|
|
|
gzip)
|
|
|
|
test "$verbose" && echo " Running gzip..." 1>&2
|
|
|
|
gzip -9 <../x.tar >$DEST/hdf5-$VERS.tar.gz;;
|
|
|
|
bzip2)
|
|
|
|
test "$verbose" && echo " Running bzip2..." 1>&2
|
1998-08-31 21:46:47 +08:00
|
|
|
bzip2 -9 <../x.tar >$DEST/hdf5-$VERS.tar.bz2;;
|
1998-07-31 03:26:54 +08:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2001-07-06 13:43:38 +08:00
|
|
|
# Copy the RELEASE.txt to the release area.
|
|
|
|
cp release_docs/RELEASE.txt $DEST/hdf5-$VERS-RELEASE.txt
|
2001-05-10 23:02:00 +08:00
|
|
|
|
1998-07-31 03:26:54 +08:00
|
|
|
# Remove temporary things
|
|
|
|
test -f ../Makefile.x && mv ../Makefile.x Makefile
|
1998-09-08 21:38:29 +08:00
|
|
|
rm -f $MANIFEST
|
1998-07-31 03:26:54 +08:00
|
|
|
rm -f ../hdf5-$VERS
|
|
|
|
rm -f ../x.tar
|
|
|
|
exit 0
|