summaryrefslogtreecommitdiff
path: root/yhttpd-0.7.2/scripts/buildnr.pl
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2013-04-06 13:14:41 +0200
committerPaul Buetow <paul@buetow.org>2013-04-06 13:14:41 +0200
commit9cd3ccffd5372dfde3af478e3f832f18db4be3f1 (patch)
tree631c295a4a4a16b57502b847626763a279bf6df7 /yhttpd-0.7.2/scripts/buildnr.pl
parent13aaf70af703748fe096e0664c305cd202637ad2 (diff)
tagging tags
Diffstat (limited to 'yhttpd-0.7.2/scripts/buildnr.pl')
-rwxr-xr-xyhttpd-0.7.2/scripts/buildnr.pl26
1 files changed, 26 insertions, 0 deletions
diff --git a/yhttpd-0.7.2/scripts/buildnr.pl b/yhttpd-0.7.2/scripts/buildnr.pl
new file mode 100755
index 0000000..edfffd6
--- /dev/null
+++ b/yhttpd-0.7.2/scripts/buildnr.pl
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+
+# The yhttpd Project (2003)
+#
+# This script increases the BUILNR of msgs,h each time the yhttpd
+# gets recompiled!
+
+use strict;
+
+open MSGS, "src/msgs.h";
+my @msgs = <MSGS>;
+close MSGS;
+
+foreach (@msgs)
+{
+ if ( /define BUILDNR/ )
+ {
+ s/(BUILDNR )(.+)$/$1.($2+1)/e;
+ print;
+ next;
+ }
+}
+
+open MSGS, ">src/msgs.h";
+print MSGS @msgs;
+close MSGS;