Ignore:
Timestamp:
2011-08-03T21:17:30+12:00 (13 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.

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

Legend:

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

    r24192 r24362  
    2828
    2929use strict;
    30 
     30use util;
    3131use inexport;
    32 use Config; # for getting the perlpath in the recommended way
    3332
    3433our $authenication_enabled = 0;
     
    434433    my $gsdl_cgi = $self->{'gsdl_cgi'};
    435434
    436     my $sendmail_command = "\"$Config{perlpath}\" -S sendmail.pl";
     435    my $sendmail_command = "\"".&util::get_perl_exec()."\" -S sendmail.pl";
    437436    $sendmail_command .= " -to \"" . $mail_to_address . "\"";
    438437    $sendmail_command .= " -from \"" . $mail_from_address . "\"";
     
    463462    $perl_args = "-collectdir \"$collect_dir\" " . $perl_args;
    464463
    465     my $perl_command = "\"$Config{perlpath}\" -S $script $perl_args";
     464    my $perl_command = "\"".&util::get_perl_exec()."\" -S $script $perl_args";
    466465
    467466
  • main/trunk/greenstone2/perllib/cgiactions/buildaction.pm

    r24192 r24362  
    3636
    3737use util;
    38 use Config; # for getting the perlpath in the recommended way
    3938
    4039BEGIN {
     
    139138
    140139    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    141     my $cmd = "\"$Config{perlpath}\" -S full-import.pl \"$collect\"";
     140    my $cmd = "\"".&util::get_perl_exec()."\" -S full-import.pl \"$collect\"";
    142141
    143142    my ($status,$report) = $self->run_build_cmd($cmd);
     
    178177
    179178    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    180     my $cmd = "\"$Config{perlpath}\" -S full-buildcol.pl \"$collect\"";
     179    my $cmd = "\"".&util::get_perl_exec()."\" -S full-buildcol.pl \"$collect\"";
    181180
    182181    my ($status,$report) = $self->run_build_cmd($cmd);
     
    216215   
    217216    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    218     my $cmd = "\"$Config{perlpath}\" -S full-rebuild.pl \"$collect\"";
     217    my $cmd = "\"".&util::get_perl_exec()."\" -S full-rebuild.pl \"$collect\"";
    219218
    220219    my ($status,$report) = $self->run_build_cmd($cmd);
     
    256255
    257256    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    258     my $cmd = "\"$Config{perlpath}\" -S incremental-import.pl \"$collect\"";
     257    my $cmd = "\"".&util::get_perl_exec()."\" -S incremental-import.pl \"$collect\"";
    259258
    260259    my ($status,$report) = $self->run_build_cmd($cmd);
     
    295294
    296295    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    297     my $cmd = "\"$Config{perlpath}\" -S incremental-buildcol.pl \"$collect\"";
     296    my $cmd = "\"".&util::get_perl_exec()."\" -S incremental-buildcol.pl \"$collect\"";
    298297
    299298    my ($status,$report) = $self->run_build_cmd($cmd);
     
    334333
    335334    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    336     my $cmd = "\"$Config{perlpath}\" -S incremental-rebuild.pl \"$collect\"";
     335    my $cmd = "\"".&util::get_perl_exec()."\" -S incremental-rebuild.pl \"$collect\"";
    337336
    338337    my ($status,$report) = $self->run_build_cmd($cmd);
     
    404403       
    405404        ## my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    406         my $cmd = "\"$Config{perlpath}\" -S incremental-rebuild.pl -manifest \"$manifest_filename\" \"$collect\"";
     405        my $cmd = "\"".&util::get_perl_exec()."\" -S incremental-rebuild.pl -manifest \"$manifest_filename\" \"$collect\"";
    407406
    408407        ($status,$report) = $self->run_build_cmd($cmd);
  • main/trunk/greenstone2/perllib/cgiactions/indexaction.pm

    r24192 r24362  
    2929
    3030use strict;
    31 
     31use util;
    3232use cgiactions::baseaction;
    33 use Config; # for getting the perlpath in the recommended way
    3433
    3534
    3635@indexaction::ISA = ('baseaction');
    37 
    38 
    39 
    40 
    41 
    42 
    4336
    4437# 'a' for action, and 'c' for collection are also compulsorary, and
     
    133126
    134127    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    135     my $cmd = "\"$Config{perlpath}\" -S full-import.pl \"$collect\"";
     128    my $cmd = "\"".&util::get_perl_exec()."\" -S full-import.pl \"$collect\"";
    136129
    137130    my ($status,$report) = $self->run_build_cmd($cmd);
     
    172165
    173166    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    174     my $cmd = "\"$Config{perlpath}\" -S full-buildcol.pl \"$collect\"";
     167    my $cmd = "\"".&util::get_perl_exec()."\" -S full-buildcol.pl \"$collect\"";
    175168
    176169    my ($status,$report) = $self->run_build_cmd($cmd);
     
    211204
    212205    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    213     my $cmd = "\"$Config{perlpath}\" -S full-rebuild.pl \"$collect\"";
     206    my $cmd = "\"".&util::get_perl_exec()."\" -S full-rebuild.pl \"$collect\"";
    214207
    215208    my ($status,$report) = $self->run_build_cmd($cmd);
     
    251244
    252245    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    253     my $cmd = "\"$Config{perlpath}\" -S incremental-import.pl \"$collect\"";
     246    my $cmd = "\"".&util::get_perl_exec()."\" -S incremental-import.pl \"$collect\"";
    254247
    255248    my ($status,$report) = $self->run_build_cmd($cmd);
     
    292285
    293286    my $bin_script = &util::filename_cat($gsdl_home,"bin","script");
    294     my $cmd = "\"$Config{perlpath}\" -S incremental-buildcol.pl \"$collect\"";
     287    my $cmd = "\"".&util::get_perl_exec()."\" -S incremental-buildcol.pl \"$collect\"";
    295288
    296289    my ($status,$report) = $self->run_build_cmd($cmd);
     
    329322    $self->lock_collection($username, $collect);
    330323
    331     my $cmd = "\"$Config{perlpath}\" -S incremental-rebuild.pl \"$collect\"";
     324    my $cmd = "\"".&util::get_perl_exec()."\" -S incremental-rebuild.pl \"$collect\"";
    332325
    333326    my ($status,$report) = $self->run_build_cmd($cmd);
Note: See TracChangeset for help on using the changeset viewer.