diff options
| author | Paul Buetow <paul@buetow.org> | 2009-01-27 23:25:11 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2009-01-27 23:25:11 +0000 |
| commit | 19f9940dc968afae01b54377ee23ec59069c9646 (patch) | |
| tree | f3aeb664f44aec07de640bce0326ec1b5e478c51 /0.8/scripts/setglobvals.pl | |
| parent | 1c8047e99b6a7199e447bb5a70438837cc5f7890 (diff) | |
Diffstat (limited to '0.8/scripts/setglobvals.pl')
| -rwxr-xr-x | 0.8/scripts/setglobvals.pl | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/0.8/scripts/setglobvals.pl b/0.8/scripts/setglobvals.pl new file mode 100755 index 0000000..13288a5 --- /dev/null +++ b/0.8/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; + } + } +} + |
