genRules revision 78f51585b9ef1095880ddd235a8d41ff9e152fc5
97a9a944b5887e91042b019776c41d5dd74557aferikabele#!/usr/bin/perl
97a9a944b5887e91042b019776c41d5dd74557aferikabele
97a9a944b5887e91042b019776c41d5dd74557aferikabeleuse strict;
a945f35eff8b6a88009ce73de6d4c862ce58de3csliveuse File::Basename;
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive
a945f35eff8b6a88009ce73de6d4c862ce58de3cslivemy $un=`uname`;
fe64b2ba25510d8c9dba5560a2d537763566cf40ndmy $suf = 'unknown';
fe64b2ba25510d8c9dba5560a2d537763566cf40nd
fe64b2ba25510d8c9dba5560a2d537763566cf40nd$un =~ m"^SunOS" && do {$suf = "solaris"};
fe64b2ba25510d8c9dba5560a2d537763566cf40nd$un =~ m"^Linux" && do {$suf = "linux"};
fe64b2ba25510d8c9dba5560a2d537763566cf40nd$un =~ m"^Darwin" && do {$suf = "macintosh"};
fe64b2ba25510d8c9dba5560a2d537763566cf40nd
fe64b2ba25510d8c9dba5560a2d537763566cf40ndif($suf eq 'unknown') {
fe64b2ba25510d8c9dba5560a2d537763566cf40nd print STDERR "Unknown system\nSupported systems: solaris (SunOS), Linux\n";
fe64b2ba25510d8c9dba5560a2d537763566cf40nd exit 1;
fe64b2ba25510d8c9dba5560a2d537763566cf40nd}
fe64b2ba25510d8c9dba5560a2d537763566cf40nd
fe64b2ba25510d8c9dba5560a2d537763566cf40ndif ($suf eq 'linux') {
fe64b2ba25510d8c9dba5560a2d537763566cf40nd my $tmp = $ENV{'LD_LIBRARY_PATH'} if exists $ENV{'LD_LIBRARY_PATH'};
fe64b2ba25510d8c9dba5560a2d537763566cf40nd if (defined $tmp) {
fe64b2ba25510d8c9dba5560a2d537763566cf40nd $ENV{'LD_LIBRARY_PATH'} = "$tmp:/usr/local/lib";
fe64b2ba25510d8c9dba5560a2d537763566cf40nd } else {
fe64b2ba25510d8c9dba5560a2d537763566cf40nd $ENV{'LD_LIBRARY_PATH'} = "/usr/local/lib";
fe64b2ba25510d8c9dba5560a2d537763566cf40nd }
fe64b2ba25510d8c9dba5560a2d537763566cf40nd}
fe64b2ba25510d8c9dba5560a2d537763566cf40nd
fe64b2ba25510d8c9dba5560a2d537763566cf40ndexec("$0.$suf",@ARGV);
fe64b2ba25510d8c9dba5560a2d537763566cf40ndprint STDERR 'couldn\'t exec "',"$0.$suf","\"\n";
fe64b2ba25510d8c9dba5560a2d537763566cf40ndexit 2;
117c1f888a14e73cdd821dc6c23eb0411144a41cnd