Changeset 32026 for main/trunk


Ignore:
Timestamp:
2017-10-05T21:48:01+13:00 (7 years ago)
Author:
ak19
Message:

Some more placeholder strings for the UnknownConverterPlugin to recognise and replace appropriately

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/UnknownConverterPlugin.pm

    r31766 r32026  
    114114    $self->set_standard_convert_settings();
    115115
     116    # one-time replacements in exec_cmd happen here
     117    # don't nest GSDL env paths in (escaped) double quotes, as they're likely to be part of larger paths
     118    # It's up to the user to do the (escaped) double-quoting around paths.
     119    my $cmd = $self->{'exec_cmd'};
     120    $cmd =~ s@%GSDL3SRCHOME@$ENV{'GSDL3SRCHOME'}@g;
     121    $cmd =~ s@%GSDLHOME@$ENV{'GSDLHOME'}@g;
     122    $cmd =~ s@%GSDL3HOME@$ENV{'GSDL3HOME'}@g;
     123    $self->{'exec_cmd'} = $cmd;
     124   
    116125    my $secondary_plugin_name = $self->{'convert_to_plugin'};
    117126    my $secondary_plugin_options = $self->{'secondary_plugin_options'};
     
    245254    }
    246255
    247     # replace occurrences of placeholders in cmd string
     256    # replace remaining occurrences of placeholders in cmd string, the ones that change per input file
    248257    #$cmd =~ s@\"@\\"@g;
    249258    $cmd =~ s@%INPUT_FILE@\"$tmp_filename\"@g; # refer to the softlink
Note: See TracChangeset for help on using the changeset viewer.