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/build

    r23313 r24093  
    276276        #       option was given to build)
    277277
    278         my $download_cmd = "perl -S gsWget.pl -P \"$importdir\" -np -nv";
     278        #$^X is a special variable containing the full path to the current perl executable we are in
     279        my $download_cmd = "$^X -S gsWget.pl -P \"$importdir\" -np -nv";
    279280        $download_cmd .= " -r -N -l inf -R \"*\\?*\"";
    280281        $download_cmd .= " -o \"$outfile.download\"" if $use_out;
     
    325326        if (-e $download_dir) {
    326327            # copy download_dir and all it contains to the import directory
    327             my $download_cmd = "perl -S filecopy.pl";
     328            #$^X is a special variable containing the full path to the current perl executable we are in
     329            my $download_cmd = "$^X -S filecopy.pl";
    328330            $download_cmd .= " -collectdir \"$collectdir\"" if $collectdir =~ /\w/;
    329331            $download_cmd .= " -site \"$site\"" if $site =~ /\w/;
     
    464466    print $out "importing the $collection collection\n\n";
    465467
    466     my $import_cmd = "perl -S import.pl";
     468    #$^X is a special variable containing the full path to the current perl executable we are in
     469    my $import_cmd = "$^X -S import.pl";
    467470    $import_cmd .= " -out \"$outfile.import\"" if $use_out;
    468471    if ($append) {
     
    510513    print $out "building the $collection collection\n\n";
    511514
    512     my $build_cmd = "perl -S buildcol.pl";
     515    #$^X is a special variable containing the full path to the current perl executable we are in
     516    my $build_cmd = "$^X -S buildcol.pl";
    513517
    514518    my $removeold = 1;
Note: See TracChangeset for help on using the changeset viewer.