summaryrefslogtreecommitdiffstats
path: root/bin/h5vers
diff options
context:
space:
mode:
Diffstat (limited to 'bin/h5vers')
-rwxr-xr-xbin/h5vers7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/h5vers b/bin/h5vers
index f512c98..eefca78 100755
--- a/bin/h5vers
+++ b/bin/h5vers
@@ -4,6 +4,7 @@ exit
#! perl
require 5.003;
+use strict;
### Copyright © 1998 NCSA.
# Robb Matzke <matzke@llnl.gov>
@@ -124,8 +125,9 @@ unless ($file) {
($file=$_,last) if -f $_;
}
}
+die "unable to find source files\n" unless defined $file;
die "unable to read file: $file\n" unless -r $file;
-$README = $file;
+my $README = $file;
$README =~ s/[^\/]*$/..\/README/;
die "unable to read file: $README\n" unless -r $file;
@@ -136,6 +138,7 @@ close FILE;
my (@curver) = getvers $contents;
# Determine the new version number.
+my @newver; #new version
if ($set) {
if ($set =~ /(\d+)\.(\d+)\.(\d+)/) {
@newver = ($1, $2, $3);
@@ -187,7 +190,7 @@ if ($newver[0]!=$curver[0] ||
# Update the README file
if ($README) {
open FILE, $README or die "$README: $!\n";
- @contents = <FILE>;
+ my @contents = <FILE>;
close FILE;
$contents[0] = sprintf("This is hdf5-%d.%d.%d currently under development\n",
@newver);