hdf5/bin/release

149 lines
3.6 KiB
Plaintext
Raw Normal View History

#!/bin/sh
# Make a release of hdf5. The command-line switches are:
#
# -d DIR The name of the directory where the releas(es) should be
# placed. By default, the directory is ./releases
#
# --nocheck Ignore errors in MANIFEST file.
#
# 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):
#
# 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.
#
# Examples:
#
# $ release
# releases/hdf5-1.0.38.tar
#
# $ 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
#
# 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//'
#
# Albert Cheng, 1999-10-26
# Moved the MANIFEST checking to a separate command file so that
# it can be invoked individually.
# Defaults
DEST=releases
1999-01-07 19:37:42 +08:00
VERS=`perl bin/h5vers`
test "$VERS" || exit 1
verbose=yes
check=yes
# Command-line arguments
while [ -n "$1" ]; do
arg=$1
shift
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
if [ "X$methods" = "X" ]; then
methods=tar
fi
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
# Check the validity of the MANIFEST file.
bin/chkmanifest || fail=yes
if [ "X$fail" = "Xyes" ]; then
if [ $check = yes ]; then
exit 1
else
echo "Continuing anyway..."
fi
fi
# Create a manifest that contains only files for distribution.
MANIFEST=/tmp/H5_MANIFEST.$$
grep '^\.' MANIFEST | grep -v _DO_NOT_DISTRIBUTE_ >$MANIFEST
# Prepare the source tree for a release.
test -h ../hdf5-$VERS && rm ../hdf5-$VERS
ln -s `pwd` ../hdf5-$VERS || exit 1
mv Makefile ../Makefile.x 2>/dev/null #might fail
cp -p Makefile.dist Makefile
# 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/.
# Create the tar file
test "$verbose" && echo " Running tar..." 1>&2
( \
cd ..; \
tar cf x.tar hdf5-$VERS/Makefile \
`sed 's/^\.\//hdf5-'$VERS'\//' $MANIFEST` || exit 1 \
)
# 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
[svn-r633] Changes since 19980828 ---------------------- ./RELEASE Updated with important changes I made since the second beta. ./src/H5A.c ./src/H5D.c ./src/H5Dprivate.h ./src/H5G.c ./src/H5Gprivate.h ./src/H5R.c ./src/H5Rprivate.h ./src/H5T.c ./src/H5Tprivate.h Any API function that used to take an `hid_t loc_id' followed by a `const char *name' can now take any type of object for the loc_id as long as the object is somehow associated with a file. Internally, H5G_loc() was modified to return an H5G_entry_t* instead of an H5G_t* so it's more general. Among other things, this allows one to retrieve information about an object like a named type or dataset without knowing the name of the type or dataset: int get_nlinks (hid_t obj) { H5G_stat_t sb; if (H5Gstat(obj, ".", TRUE, &sb)<0) return -1; return sb.nlink; } ./test/gheap.c ./test/istore.c These files needed a couple of changes because they call some of the internal functions whose H5G_t arguments changed to H5G_entry_t. ./src/H5A.c Got rid of all the switch statements for getting symbol table entries for varous objects and replaced them with a call to H5G_loc() allowing attributes to automatically apply to any type of object that belongs to a file. ./test/Makefile.in Moved the ragged array tests from the normal list of tests to the `make timings' target. ./test/ragged.c Added rewrite tests -- rewrite the rows of a dataset changing the number of rows and the length of each row. ./test/mtime.c Added a test that checks that H5Gstat() can be called with a dataset as the first argument. ./src/H5S.c Added #ifdef HAVE_PARALLEL around code to check for the HDF5_MPI_OPT_TYPES environment variable because the global variable that gets set is #ifdef'd. ./bin/release bzip2 uses .bz2 as the file extension.
1998-08-31 21:46:47 +08:00
bzip2 -9 <../x.tar >$DEST/hdf5-$VERS.tar.bz2;;
esac
done
# Copy the RELEASE.txt to the release area.
cp release_docs/RELEASE.txt $DEST/hdf5-$VERS-RELEASE.txt
# Remove temporary things
test -f ../Makefile.x && mv ../Makefile.x Makefile
rm -f $MANIFEST
rm -f ../hdf5-$VERS
rm -f ../x.tar
exit 0