diff options
| author | Paul Buetow <paul@buetow.org> | 2010-11-21 16:56:10 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2010-11-21 16:56:10 +0000 |
| commit | c67ed39bc994a0aef06454c1e3044e79f712b739 (patch) | |
| tree | 4397f736b9161f50cd0b00cdcfd2b0acc7c1af7e /scripts/setglobvals.pl | |
| parent | 93ce2024a62325cbae5f2f6fd2155a4ef89cee63 (diff) | |
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; + } + } +} + |
