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.

Location:
main/trunk/greenstone2/perllib/cgiactions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/cgiactions/baseaction.pm

    r24126 r24192  
    3030
    3131use inexport;
     32use Config; # for getting the perlpath in the recommended way
    3233
    3334our $authenication_enabled = 0;
     
    433434    my $gsdl_cgi = $self->{'gsdl_cgi'};
    434435
    435     my $sendmail_command = "\"$^X\" -S sendmail.pl";
     436    my $sendmail_command = "\"$Config{perlpath}\" -S sendmail.pl";
    436437    $sendmail_command .= " -to \"" . $mail_to_address . "\"";
    437438    $sendmail_command .= " -from \"" . $mail_from_address . "\"";
     
    462463    $perl_args = "-collectdir \"$collect_dir\" " . $perl_args;
    463464
    464     my $perl_command = "\"$^X\" -S $script $perl_args";
     465    my $perl_command = "\"$Config{perlpath}\" -S $script $perl_args";
    465466
    466467
  • main/trunk/greenstone2/perllib/cgiactions/buildaction.pm

    r24126 r24192  
    3636
    3737use util;
     38use Config; # for getting the perlpath in the recommended way
    3839
    3940BEGIN {
     
    138139
    139140    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    140     my $cmd = "\"$^X\" -S full-import.pl \"$collect\"";
     141    my $cmd = "\"$Config{perlpath}\" -S full-import.pl \"$collect\"";
    141142
    142143    my ($status,$report) = $self->run_build_cmd($cmd);
     
    177178
    178179    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    179     my $cmd = "\"$^X\" -S full-buildcol.pl \"$collect\"";
     180    my $cmd = "\"$Config{perlpath}\" -S full-buildcol.pl \"$collect\"";
    180181
    181182    my ($status,$report) = $self->run_build_cmd($cmd);
     
    215216   
    216217    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    217     my $cmd = "\"$^X\" -S full-rebuild.pl \"$collect\"";
     218    my $cmd = "\"$Config{perlpath}\" -S full-rebuild.pl \"$collect\"";
    218219
    219220    my ($status,$report) = $self->run_build_cmd($cmd);
     
    255256
    256257    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    257     my $cmd = "\"$^X\" -S incremental-import.pl \"$collect\"";
     258    my $cmd = "\"$Config{perlpath}\" -S incremental-import.pl \"$collect\"";
    258259
    259260    my ($status,$report) = $self->run_build_cmd($cmd);
     
    294295
    295296    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    296     my $cmd = "\"$^X\" -S incremental-buildcol.pl \"$collect\"";
     297    my $cmd = "\"$Config{perlpath}\" -S incremental-buildcol.pl \"$collect\"";
    297298
    298299    my ($status,$report) = $self->run_build_cmd($cmd);
     
    333334
    334335    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    335     my $cmd = "\"$^X\" -S incremental-rebuild.pl \"$collect\"";
     336    my $cmd = "\"$Config{perlpath}\" -S incremental-rebuild.pl \"$collect\"";
    336337
    337338    my ($status,$report) = $self->run_build_cmd($cmd);
     
    403404       
    404405        ## my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    405         my $cmd = "\"$^X\" -S incremental-rebuild.pl -manifest \"$manifest_filename\" \"$collect\"";
     406        my $cmd = "\"$Config{perlpath}\" -S incremental-rebuild.pl -manifest \"$manifest_filename\" \"$collect\"";
    406407
    407408        ($status,$report) = $self->run_build_cmd($cmd);
  • main/trunk/greenstone2/perllib/cgiactions/indexaction.pm

    r24126 r24192  
    3131
    3232use cgiactions::baseaction;
    33 
     33use Config; # for getting the perlpath in the recommended way
    3434
    3535
     
    133133
    134134    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    135     my $cmd = "\"$^X\" -S full-import.pl \"$collect\"";
     135    my $cmd = "\"$Config{perlpath}\" -S full-import.pl \"$collect\"";
    136136
    137137    my ($status,$report) = $self->run_build_cmd($cmd);
     
    172172
    173173    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    174     my $cmd = "\"$^X\" -S full-buildcol.pl \"$collect\"";
     174    my $cmd = "\"$Config{perlpath}\" -S full-buildcol.pl \"$collect\"";
    175175
    176176    my ($status,$report) = $self->run_build_cmd($cmd);
     
    211211
    212212    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    213     my $cmd = "\"$^X\" -S full-rebuild.pl \"$collect\"";
     213    my $cmd = "\"$Config{perlpath}\" -S full-rebuild.pl \"$collect\"";
    214214
    215215    my ($status,$report) = $self->run_build_cmd($cmd);
     
    251251
    252252    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    253     my $cmd = "\"$^X\" -S incremental-import.pl \"$collect\"";
     253    my $cmd = "\"$Config{perlpath}\" -S incremental-import.pl \"$collect\"";
    254254
    255255    my ($status,$report) = $self->run_build_cmd($cmd);
     
    292292
    293293    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    294     my $cmd = "\"$^X\" -S incremental-buildcol.pl \"$collect\"";
     294    my $cmd = "\"$Config{perlpath}\" -S incremental-buildcol.pl \"$collect\"";
    295295
    296296    my ($status,$report) = $self->run_build_cmd($cmd);
     
    329329    $self->lock_collection($username, $collect);
    330330
    331     my $cmd = "\"$^X\" -S incremental-rebuild.pl \"$collect\"";
     331    my $cmd = "\"$Config{perlpath}\" -S incremental-rebuild.pl \"$collect\"";
    332332
    333333    my ($status,$report) = $self->run_build_cmd($cmd);
Note: See TracChangeset for help on using the changeset viewer.