diff options
Diffstat (limited to 'ycurses/scripts/buildnr.pl')
| -rwxr-xr-x | ycurses/scripts/buildnr.pl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ycurses/scripts/buildnr.pl b/ycurses/scripts/buildnr.pl new file mode 100755 index 0000000..7867787 --- /dev/null +++ b/ycurses/scripts/buildnr.pl @@ -0,0 +1,26 @@ +#!/usr/bin/perl + +# The ycurses Project (2003) +# +# This script increases the BUILNR of src/msgs.h each time the ycurses +# 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; |
