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

    r24125 r24192  
    4848}
    4949
     50use Config; # for getting the perlpath in the recommended way
    5051use arcinfo;
    5152use colcfg;
     
    116117    # run the mirror program from the import directory
    117118    my  $cmd = "cd $importdir; ";
    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";
     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";
    120121    # print "\n$cmd\n";
    121122    `$cmd`;
     
    127128    elsif ((-e "$etcdir/wget.cfg") && (-e "$etcdir/wget.url")) {
    128129    $ENV{WGETRC} = "$etcdir/wget.cfg";
    129     my $cmd = "\"$^X\" -S gsWget.pl --input-file=$etcdir/wget.url --directory-prefix=$importdir";
     130    my $cmd = "\"$Config{perlpath}\" -S gsWget.pl --input-file=$etcdir/wget.url --directory-prefix=$importdir";
    130131    system($cmd);
    131132    }
Note: See TracChangeset for help on using the changeset viewer.