diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-15 23:29:40 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-15 23:29:40 +0000 |
| commit | d891a923bc507f28caa69f625079755d1a2083e7 (patch) | |
| tree | 03ae20f0ecd1590629ec1e720026ccf34ddaac3f /scripts/setglobvals.pl | |
moved stuff the trunk
Diffstat (limited to 'scripts/setglobvals.pl')
| -rwxr-xr-x | scripts/setglobvals.pl | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/setglobvals.pl b/scripts/setglobvals.pl new file mode 100755 index 0000000..13288a5 --- /dev/null +++ b/scripts/setglobvals.pl @@ -0,0 +1,32 @@ +#!/usr/bin/perl + +# The yChat 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; + } + } +} + |
