diff options
| author | admin (centauri.fritz.box) <puppet@mx.buetow.org> | 2014-06-30 23:29:37 +0200 |
|---|---|---|
| committer | admin (centauri.fritz.box) <puppet@mx.buetow.org> | 2014-06-30 23:29:37 +0200 |
| commit | 751eada68e49f9ffae9a0be743d88a3ce956883f (patch) | |
| tree | 153d0a87fbe67911da4fde73e327b272b437c156 /scripts/setglobvals.pl | |
| parent | 002c8534bfe2c266959dd42c9c71c17182977d87 (diff) | |
| parent | dee37a84ae65ba8bd1e0dab6132955bbc195fa57 (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; + } + } +} + |
