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