#!/usr/bin/perl # The yhttpd Project (2003) # # This script increases the BUILNR of msgs,h each time the yhttpd # gets recompiled! use strict; open MSGS, "src/msgs.h"; my @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;