Ignore:
Timestamp:
2011-06-22T17:39:13+12:00 (13 years ago)
Author:
ak19
Message:

Sam discovered that using dollar-Config{perlpath} in place of dollar-hat-X is the better way to obtain the path to the perl that is being used. We hope this will not be a relative path on the Mac as dollar-hat-x was on Professor Witten's Mac when we tried it there today.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/build

    r24125 r24192  
    4343use FileHandle;
    4444use File::Copy;
     45use Config; # for getting the perlpath in the recommended way
    4546
    4647BEGIN {
     
    276277        #       option was given to build)
    277278
    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";
     279        #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in
     280        my $download_cmd = "\"$Config{perlpath}\" -S gsWget.pl -P \"$importdir\" -np -nv";
    280281        $download_cmd .= " -r -N -l inf -R \"*\\?*\"";
    281282        $download_cmd .= " -o \"$outfile.download\"" if $use_out;
     
    326327        if (-e $download_dir) {
    327328            # copy download_dir and all it contains to the import directory
    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";
     329            #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in
     330            my $download_cmd = "\"$Config{perlpath}\" -S filecopy.pl";
    330331            $download_cmd .= " -collectdir \"$collectdir\"" if $collectdir =~ /\w/;
    331332            $download_cmd .= " -site \"$site\"" if $site =~ /\w/;
     
    466467    print $out "importing the $collection collection\n\n";
    467468
    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";
     469    #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in
     470    my $import_cmd = "\"$Config{perlpath}\" -S import.pl";
    470471    $import_cmd .= " -out \"$outfile.import\"" if $use_out;
    471472    if ($append) {
     
    513514    print $out "building the $collection collection\n\n";
    514515
    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";
     516    #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in
     517    my $build_cmd = "\"$Config{perlpath}\" -S buildcol.pl";
    517518
    518519    my $removeold = 1;
Note: See TracChangeset for help on using the changeset viewer.