Show
Ignore:
Timestamp:
03.08.2011 21:17:30 (8 years ago)
Author:
ak19
Message:

The method of locating perl has changed once more: util now defines the fuction get_perl_exec which is used by other scripts to obtain the path to the perl executable they should use.

Files:
1 modified

Legend:

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

    r24192 r24362  
    4343use FileHandle; 
    4444use File::Copy; 
    45 use Config; # for getting the perlpath in the recommended way 
    4645 
    4746BEGIN { 
     
    277276        #       option was given to build) 
    278277 
    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"; 
     278        my $download_cmd = "\"".&util::get_perl_exec()."\" -S gsWget.pl -P \"$importdir\" -np -nv"; 
    281279        $download_cmd .= " -r -N -l inf -R \"*\\?*\""; 
    282280        $download_cmd .= " -o \"$outfile.download\"" if $use_out; 
     
    328326            # copy download_dir and all it contains to the import directory 
    329327            #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"; 
     328            my $download_cmd = "\"".&util::get_perl_exec()."\" -S filecopy.pl"; 
    331329            $download_cmd .= " -collectdir \"$collectdir\"" if $collectdir =~ /\w/; 
    332330            $download_cmd .= " -site \"$site\"" if $site =~ /\w/; 
     
    468466 
    469467    #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"; 
     468    my $import_cmd = "\"".&util::get_perl_exec()."\" -S import.pl"; 
    471469    $import_cmd .= " -out \"$outfile.import\"" if $use_out; 
    472470    if ($append) { 
     
    515513 
    516514    #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"; 
     515    my $build_cmd = "\"".&util::get_perl_exec()."\" -S buildcol.pl"; 
    518516 
    519517    my $removeold = 1;