summaryrefslogtreecommitdiffstats
path: root/bin/h5vers
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-09-09 18:19:59 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-09-09 18:19:59 (GMT)
commitba9581e64c22112c20d1d43d617fa57cad43a752 (patch)
tree233b98d56700d404b00e3a08a4a9455d098616ab /bin/h5vers
parentb44eb55b33d0efa204ec89a7d601c2b98b42d0dc (diff)
downloadhdf5-ba9581e64c22112c20d1d43d617fa57cad43a752.zip
hdf5-ba9581e64c22112c20d1d43d617fa57cad43a752.tar.gz
hdf5-ba9581e64c22112c20d1d43d617fa57cad43a752.tar.bz2
[svn-r678] ./bin/h5vers
./bin/release Fixed some minor things to make them work better.
Diffstat (limited to 'bin/h5vers')
-rwxr-xr-xbin/h5vers28
1 files changed, 25 insertions, 3 deletions
diff --git a/bin/h5vers b/bin/h5vers
index 418c994..6d30ffd 100755
--- a/bin/h5vers
+++ b/bin/h5vers
@@ -55,6 +55,28 @@ sub setvers {
$_[0] =~ s/^(\#\s*define\s+H5_VERS_RELEASE\s+)\d+/$1$vers[2]/m;
}
+sub usage {
+ my ($prog) = $0 =~ /([^\/]+)$/;
+ print STDERR <<EOF;
+Usage: $prog [OPTS] [FILE]
+ -i major|minor|release
+ Increment specified version component and set following components
+ to zero.
+ -s VERSION
+ Set the version as specified. The version number can be embedded in
+ some other string such as \"hdf5-1.1.0.tar.bz2\" or even \"this is
+ hdf5 version 1.1 release 0\" for convenience.
+ -v
+ Instead of displaying only a dotted triple version number a line such
+ as \"version 1.1 release 0\" will be printed.
+ FILE
+ The name of the file that contains version information. This is
+ seldom necessary since files H5public.h, src/H5public.h and
+ ../src/H5public.h are automatically checked.
+EOF
+ exit 1;
+}
+
# Parse arguments
my ($verbose, $set, $inc, $file);
my (@files) = ("H5public.h", "src/H5public.h", "../src/H5public.h");
@@ -78,11 +100,11 @@ while ($_ = shift) {
$verbose = 1;
next;
};
-
- /^-/ && die "unrecognized option: $ARGV[0]\n";
+ /^-(h|\?|-?help)$/ && usage;
+ /^-/ && die "unrecognized option: $_\n";
die "only one file name can be specified\n" if $file;
- $file = _;
+ $file = $_;
}
die "mutually exclusive options given\n" if $set && $inc;