aboutsummaryrefslogtreecommitdiffstats
path: root/make-version.pl
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2011-11-18 16:51:40 +0000
committerGerald Combs <gerald@wireshark.org>2011-11-18 16:51:40 +0000
commitc95e2e88ceb9c8854b9791410debf56996255856 (patch)
tree35e987d5b05a06661f7b7b1312cd104b64a02b04 /make-version.pl
parent4ad5ff513b30200fe787bab9e5b71389dfb63bed (diff)
Try to preserve native line endings when we rewrite files.
svn path=/trunk/; revision=39938
Diffstat (limited to 'make-version.pl')
-rwxr-xr-xmake-version.pl28
1 files changed, 14 insertions, 14 deletions
diff --git a/make-version.pl b/make-version.pl
index 08798a987d..b2e184f39a 100755
--- a/make-version.pl
+++ b/make-version.pl
@@ -262,8 +262,8 @@ sub update_configure_in
open(CFGIN, "< $filepath") || die "Can't read $filepath!";
while ($line = <CFGIN>) {
- if ($line =~ /^AC_INIT\(wireshark, (\d+)\.(\d+).(\d+)/) {
- $line = sprintf("AC_INIT\(wireshark, %d.%d.%d%s)\n",
+ if ($line =~ /^AC_INIT\(wireshark, (\d+)\.(\d+).(\d+).*([\r\n]+)$/) {
+ $line = sprintf("AC_INIT\(wireshark, %d.%d.%d%s)$4",
$set_version ? $version_pref{"version_major"} : $1,
$set_version ? $version_pref{"version_minor"} : $2,
$set_version ? $version_pref{"version_micro"} : $3,
@@ -291,16 +291,16 @@ sub update_config_nmake
open(CFGNMAKE, "< $filepath") || die "Can't read $filepath!";
while ($line = <CFGNMAKE>) {
- if ($line =~ /^SVN_REVISION=/) {
- $line = sprintf("SVN_REVISION=%d\n", $revision);
- } elsif ($set_version && $line =~ /^VERSION_MAJOR=/) {
- $line = sprintf("VERSION_MAJOR=%d\n", $version_pref{"version_major"});
- } elsif ($set_version && $line =~ /^VERSION_MINOR=/) {
- $line = sprintf("VERSION_MINOR=%d\n", $version_pref{"version_minor"});
- } elsif ($set_version && $line =~ /^VERSION_MICRO=/) {
- $line = sprintf("VERSION_MICRO=%d\n", $version_pref{"version_micro"});
- } elsif ($line =~ /^VERSION_EXTRA=/) {
- $line = "VERSION_EXTRA=$package_string\n";
+ if ($line =~ /^SVN_REVISION=.*([\r\n]+)$/) {
+ $line = sprintf("SVN_REVISION=%d$1", $revision);
+ } elsif ($set_version && $line =~ /^VERSION_MAJOR=.*([\r\n]+)$/) {
+ $line = sprintf("VERSION_MAJOR=%d$1", $version_pref{"version_major"});
+ } elsif ($set_version && $line =~ /^VERSION_MINOR=.*([\r\n]+)$/) {
+ $line = sprintf("VERSION_MINOR=%d$1", $version_pref{"version_minor"});
+ } elsif ($set_version && $line =~ /^VERSION_MICRO=.*([\r\n]+)$/) {
+ $line = sprintf("VERSION_MICRO=%d$1", $version_pref{"version_micro"});
+ } elsif ($line =~ /^VERSION_EXTRA=.*([\r\n]+)$/) {
+ $line = "VERSION_EXTRA=$package_string$1";
}
$contents .= $line
}
@@ -326,8 +326,8 @@ sub update_release_notes
while ($line = <RELNOTES>) {
# <!ENTITY WiresharkCurrentVersion "1.7.1">
- if ($line =~ /<\!ENTITY\s+WiresharkCurrentVersion\s+/) {
- $line = sprintf("<!ENTITY WiresharkCurrentVersion \"%d.%d.%d\">\n",
+ if ($line =~ /<\!ENTITY\s+WiresharkCurrentVersion\s+.*([\r\n]+)$/) {
+ $line = sprintf("<!ENTITY WiresharkCurrentVersion \"%d.%d.%d\">$1",
$version_pref{"version_major"},
$version_pref{"version_minor"},
$version_pref{"version_micro"},