summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/h5vers28
-rwxr-xr-xbin/release4
2 files changed, 27 insertions, 5 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;
diff --git a/bin/release b/bin/release
index 5d3db7a..427d025 100755
--- a/bin/release
+++ b/bin/release
@@ -68,7 +68,7 @@ for file in `cat $MANIFEST`; do
done
for cvs in `find . -type d -name CVS -print`; do
path=`echo $cvs |sed s+/CVS++`
- for file in `cut -d/ -f2 $cvs/Entries`; do
+ for file in `grep '^\/' $cvs/Entries |cut -d/ -f2`; do
if (grep $path/$file $MANIFEST >/dev/null); then
:
else
@@ -77,7 +77,7 @@ for cvs in `find . -type d -name CVS -print`; do
fi
done
done
-for file in ./Changes `svf ls`; do
+for file in ./Changes `sh -c 'svf ls' 2>/dev/null`; do
if (grep $file $MANIFEST >/dev/null); then
:
elif [ $file = ./Changes ]; then