Ignore:
Timestamp:
2011-05-26T14:45:49+12:00 (13 years ago)
Author:
sjm84
Message:

Fixing issues with perl finding the wrong perl by making sure it uses the one that is currently running

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/mirror.pl

    r13053 r24093  
    116116    # run the mirror program from the import directory
    117117    my  $cmd = "cd $importdir; ";
    118     $cmd .= "perl -S gsw3mir.pl -cfgfile $etcdir/w3mir.cfg";
     118    #$^X is a special variable containing the full path to the current perl executable we are in
     119    $cmd .= "$^X -S gsw3mir.pl -cfgfile $etcdir/w3mir.cfg";
    119120    # print "\n$cmd\n";
    120121    `$cmd`;
     
    126127    elsif ((-e "$etcdir/wget.cfg") && (-e "$etcdir/wget.url")) {
    127128    $ENV{WGETRC} = "$etcdir/wget.cfg";
    128     my $cmd = "perl -S gsWget.pl --input-file=$etcdir/wget.url --directory-prefix=$importdir";
     129    my $cmd = "$^X -S gsWget.pl --input-file=$etcdir/wget.url --directory-prefix=$importdir";
    129130    system($cmd);
    130131    }
Note: See TracChangeset for help on using the changeset viewer.