summaryrefslogtreecommitdiff
path: root/scripts/buildnr.pl
diff options
context:
space:
mode:
authoradmin (centauri.fritz.box) <puppet@mx.buetow.org>2014-06-30 23:29:37 +0200
committeradmin (centauri.fritz.box) <puppet@mx.buetow.org>2014-06-30 23:29:37 +0200
commit751eada68e49f9ffae9a0be743d88a3ce956883f (patch)
tree153d0a87fbe67911da4fde73e327b272b437c156 /scripts/buildnr.pl
parent002c8534bfe2c266959dd42c9c71c17182977d87 (diff)
parentdee37a84ae65ba8bd1e0dab6132955bbc195fa57 (diff)
Merge remote-tracking branch 'remotes/github/0.7' into 0.70.7@210.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;