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/mirror.pl

    r24192 r24362  
    4848} 
    4949 
    50 use Config; # for getting the perlpath in the recommended way 
    5150use arcinfo; 
    5251use colcfg; 
     
    117116    # run the mirror program from the import directory 
    118117    my  $cmd = "cd $importdir; "; 
    119     #Config{perlpath}, like $^X, is a special variable containing the full path to the current perl executable we are in 
    120     $cmd .= "\"$Config{perlpath}\" -S gsw3mir.pl -cfgfile $etcdir/w3mir.cfg"; 
     118    # need to ensure that the path to perl is quoted (in case there's spaces in it) 
     119    $cmd .= "\"".&util::get_perl_exec()."\" -S gsw3mir.pl -cfgfile $etcdir/w3mir.cfg"; 
    121120    # print "\n$cmd\n"; 
    122121    `$cmd`; 
     
    128127    elsif ((-e "$etcdir/wget.cfg") && (-e "$etcdir/wget.url")) { 
    129128    $ENV{WGETRC} = "$etcdir/wget.cfg"; 
    130     my $cmd = "\"$Config{perlpath}\" -S gsWget.pl --input-file=$etcdir/wget.url --directory-prefix=$importdir"; 
     129    my $cmd = "\"".&util::get_perl_exec()."\" -S gsWget.pl --input-file=$etcdir/wget.url --directory-prefix=$importdir"; 
    131130    system($cmd); 
    132131    }