mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-19 16:50:46 +08:00
[svn-r357] ./MANIFEST
./bin/versinc Forgot to add this to cvs last time.
This commit is contained in:
parent
1c1679b2d4
commit
6034a988cd
1
MANIFEST
1
MANIFEST
@ -16,6 +16,7 @@
|
||||
./bin/errors
|
||||
./bin/install-sh
|
||||
./bin/release
|
||||
./bin/versinc
|
||||
./config/BlankForm
|
||||
./config/alpha-dec
|
||||
./config/commence.in
|
||||
|
28
bin/versinc
Normal file
28
bin/versinc
Normal file
@ -0,0 +1,28 @@
|
||||
#! /usr/local/bin/perl -w
|
||||
require 5.003;
|
||||
|
||||
$hdr = "./src/H5public.h";
|
||||
$bak = "./src/H5public.h~";
|
||||
$tmp = "./src/H5public.$$";
|
||||
|
||||
# Open files
|
||||
open OLD, $hdr or die "cannot read $hdr";
|
||||
open NEW, ">$tmp" or die "cannot write to $tmp";
|
||||
|
||||
while (<OLD>) {
|
||||
if (/^(\#\s*define\s+H5_VERS_RELEASE\s+)(\d+)(.*)/) {
|
||||
print NEW $1, $2+1, $3, "\n";
|
||||
} elsif (/^(\#\s*define\s+H5_VERS_PATCH\s+)(\d+)(.*)/) {
|
||||
print NEW $1, "0", $3, "\n";
|
||||
} else {
|
||||
print NEW;
|
||||
}
|
||||
}
|
||||
close OLD;
|
||||
close NEW;
|
||||
|
||||
# Create a backup
|
||||
rename $hdr, $bak or warn "cannot create backup version";
|
||||
rename $tmp, $hdr or die "cannot update version number";
|
||||
|
||||
exit 0;
|
Loading…
x
Reference in New Issue
Block a user