mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-30 15:32:37 +08:00
[svn-r678] ./bin/h5vers
./bin/release Fixed some minor things to make them work better.
This commit is contained in:
parent
b44eb55b33
commit
ba9581e64c
28
bin/h5vers
28
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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user