summaryrefslogtreecommitdiff
path: root/scripts/buildnr.pl
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2010-11-21 16:22:46 +0000
committerPaul Buetow <paul@buetow.org>2010-11-21 16:22:46 +0000
commitdee37a84ae65ba8bd1e0dab6132955bbc195fa57 (patch)
tree4397f736b9161f50cd0b00cdcfd2b0acc7c1af7e /scripts/buildnr.pl
parent93ce2024a62325cbae5f2f6fd2155a4ef89cee63 (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;