From b891420946d5269cc326d67555c6aab3db41a01a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 21 Nov 2010 17:01:59 +0000 Subject: added yhttpd and ycurses trunk versions --- yhttpd/scripts/setglobvals.pl | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 yhttpd/scripts/setglobvals.pl (limited to 'yhttpd/scripts/setglobvals.pl') diff --git a/yhttpd/scripts/setglobvals.pl b/yhttpd/scripts/setglobvals.pl new file mode 100755 index 0000000..1ee1de4 --- /dev/null +++ b/yhttpd/scripts/setglobvals.pl @@ -0,0 +1,32 @@ +#!/usr/bin/perl + +# The yhttpd Project (2003) +# +# This script sets up some variables in src/glob.h + +use strict; + +use scripts::modules::file; + +my $file = 'src/glob.h'; +my $gmake = `which gmake`; +my @glob = fopen($file); +chomp($gmake); + +print "-> Setting values in $file\n"; + +my $modified = 0; +foreach (@glob) +{ + if (/^(#define GMAKE) "(.*)"/) + { + if ($2 ne "$gmake \\0") + { + s/^$1 "$2"/#define GMAKE "$gmake \\0"/; + print " -> Set $gmake\n"; + fwrite($file,@glob); + last; + } + } +} + -- cgit v1.2.3