summaryrefslogtreecommitdiff
path: root/scripts/buildnr.pl
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2009-01-27 23:25:11 +0000
committerPaul Buetow <paul@buetow.org>2009-01-27 23:25:11 +0000
commit498c570e089b41f122584ace973a69b7590232cd (patch)
treee45ffca8cf18ac5d00a2928229d8a717a3718669 /scripts/buildnr.pl
parent5dcfbb71e9e44b33caefe80f2a5d8ccd3431f3d9 (diff)
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;