summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-01-29 21:56:06 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-01-29 21:56:06 (GMT)
commitcb8a986afd0b24c107d529ee144cdf8e97099472 (patch)
tree2273e5429585daf77234482d505ed4354bb54809 /bin
parent28e23330df9b9d35c1c13e1f983f66b4a98afe36 (diff)
downloadhdf5-cb8a986afd0b24c107d529ee144cdf8e97099472.zip
hdf5-cb8a986afd0b24c107d529ee144cdf8e97099472.tar.gz
hdf5-cb8a986afd0b24c107d529ee144cdf8e97099472.tar.bz2
[svn-r198] Changes since 19980129
---------------------- ./INSTALL ./INSTALL_MAINT ./README Updated installation instructions for hdf-5.0.0a. ./RELEASE Updated release notes. Needs more work. ./bin/release The tarballs include the name of the root directory like hdf-5.0.0a so it doesn't have to be explicitly created when the files are extracted.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/release32
1 files changed, 27 insertions, 5 deletions
diff --git a/bin/release b/bin/release
index 6b96fa0..9904c00 100755
--- a/bin/release
+++ b/bin/release
@@ -1,5 +1,6 @@
#! /usr/local/bin/perl -w
require 5.003;
+use Cwd;
# Builds a release. Arguments are zero or more of the words.
#
@@ -60,7 +61,7 @@ sub setver ($;$$$) {
#
sub release (@) {
my @types = @_;
- my ($ver, $status);
+ my ($ver, $status, $created_symlink);
local $_;
# Make sure the version number is correct.
@@ -79,16 +80,32 @@ sub release (@) {
$status = system "cp Makefile.dist Makefile";
die "cannot install default Makefile" if $status >> 8;
- # Make sure release directory exists and create a name.
+ # Make sure release directory exists
(mkdir $releases, 0777 or die "cannot create $releases")
unless -d $releases;
die "no manifest" unless -r "MANIFEST";
- my $name = "$releases/hdf-$ver";
- # Build the releases
+ # We build the release from above the root of the source tree so the
+ # hdf5 directory appears as part of the name in the tar file. We create
+ # a temporary symlink called something like `hdf-5.0.0a' that points to
+ # our current working directory.
+ $_ = cwd;
+ my ($parent,$root) = m%(.*)/(.*)$% or die "cannot split directory";
+ if ($root ne "hdf-$ver" && ! -e "../hdf-$ver") {
+ symlink $root, "../hdf-$ver" or die "cannot create link";
+ $created_symlink = 1;
+ }
+ my $name = "$root/$releases/hdf-$ver";
+
+ # Build the releases.
@types = ("gzip") unless @types;
@types = qw/tar gzip compress bzip2/ if 1==@types && "all" eq $types[0];
- my $filelist = 'Makefile `cat MANIFEST`';
+ $_ = `cat MANIFEST`;
+ s/^\.\///mg;
+ @filelist = ("Makefile", split /\s*\n/, $_);
+ $filelist = join " ", map {"hdf-$ver/$_"} @filelist;
+
+ chdir ".." or die;
for (@types) {
print "Compressing with $_...\n";
@@ -114,6 +131,11 @@ sub release (@) {
} continue {
print STDERR "$_ failed\n" if $status >> 8;
}
+ chdir $root or die;
+
+ # Remove the temporary symlink we created above.
+ unlink "../hdf-$ver" if $created_symlink;
+
# Update version info
print <<EOF;