summaryrefslogtreecommitdiff
path: root/scripts/buildnr.pl
diff options
context:
space:
mode:
authoradmin (centauri.fritz.box) <puppet@mx.buetow.org>2014-07-01 20:17:26 +0200
committeradmin (centauri.fritz.box) <puppet@mx.buetow.org>2014-07-01 20:17:26 +0200
commit0b4ccf59b27f0a8de71b10120b50c916fdbc46a0 (patch)
tree4252a66e1438004c08c1ac96338a0352a2408d58 /scripts/buildnr.pl
parenta7aa66722070de6ab2e84e5a1311b96c98f36e14 (diff)
parentc67ed39bc994a0aef06454c1e3044e79f712b739 (diff)
Merge remote-tracking branch 'remotes/github/ychat-0.7' into ychat-0.7ychat-0.7
Diffstat (limited to 'scripts/buildnr.pl')
-rwxr-xr-xscripts/buildnr.pl26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/buildnr.pl b/scripts/buildnr.pl
new file mode 100755
index 0000000..ee3d3e2
--- /dev/null
+++ b/scripts/buildnr.pl
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+
+# The yChat Project (2003)
+#
+# This script increases the BUILNR of msgs,h each time the yChat
+# 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;