Changeset 39012
- Timestamp:
- 2024-05-09T21:00:52+12:00 (5 weeks ago)
- Location:
- main/trunk/greenstone2/perllib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/convertutil.pm
r38737 r39012 235 235 # for portability between Greenstone installation, substitute gsdl environment variable in $command 236 236 my $gsdl3srchome = $ENV{'GSDL3SRCHOME'}; 237 if (($ENV{'GSDLOS'} =~ m/^windows$/i) && ($^O ne "cygwin")) { 238 $gsdl3srchome =~ s@\\@\/@g; 239 } 237 240 my $gsdl_substitute_command = $command; 238 241 $gsdl_substitute_command =~ s@$gsdl3srchome@\$GSDL3SRCHOME@g; -
main/trunk/greenstone2/perllib/plugins/BaseMediaConverter.pm
r38478 r39012 98 98 } 99 99 100 # If on windows: converting file path parameters/local vars into unix style slashes. (It's easier than 101 # turning every windows backslash into double backslash for regex, which created more problems.) 102 if (($ENV{'GSDLOS'} =~ m/^windows$/i) && ($^O ne "cygwin")) { 103 $cached_dir =~ s@\\@\/@g; 104 $base_dir =~ s@\\@\/@g; 105 $collect_dir =~ s@\\@\/@g; 106 $ENV{'GSDLHOME'} =~ s@\\@\/@g; 107 } 108 100 109 # populate hashmap with regex matcher to regex replacement search 101 110 # https://stackoverflow.com/questions/41334509/can-i-use-qq-or-q-instead-of-qw-in-the-following-perl-script 102 111 # https://perldoc.perl.org/perlop#Regexp-Quote-Like-Operators 103 $prefixre_to_replacere_map{qr/^$base_dir(.*?)$/} = "" ;112 $prefixre_to_replacere_map{qr/^$base_dir(.*?)$/} = "" if ($base_dir !~ m@\s*@); 104 113 $prefixre_to_replacere_map{qr/^$cached_dir(.*?)$/} = qr/[\/\\][^\/\\]+([\/\\][^\/\\]*)$/; 105 114 $prefixre_to_replacere_map{qr/^$collect_dir\/(tmp\/.*?)$/} = "";
Note:
See TracChangeset
for help on using the changeset viewer.