From: Bernd Bleßmann Date: Fri, 27 Jul 2018 15:46:11 +0000 (+0200) Subject: installation_check: shell_quote mit vorangestelltem Modulnamen aufrufen, … X-Git-Tag: release-3.5.4~340 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ec77bc7820d8cc17dd44e8fdef943f3276efcae4;p=kivitendo-erp.git installation_check: shell_quote mit vorangestelltem Modulnamen aufrufen, … … sonst wird die subroutine nicht gefunden, wenn mit require eingebunden wird. Kam im commit 1cff7d8034b00f4fd365a716596b54b798f035d7 "InstallationCheck: String::Shellcode nicht zur compilezeit laden" rein. --- diff --git a/SL/InstallationCheck.pm b/SL/InstallationCheck.pm index d35151474..56ec690ed 100644 --- a/SL/InstallationCheck.pm +++ b/SL/InstallationCheck.pm @@ -128,8 +128,8 @@ sub template_dirs { sub classes_from_latex { my ($path, $class) = @_; eval { require String::ShellQuote; 1 } or warn "can't load String::ShellQuote" && return; - $path = shell_quote $path; - $class = shell_quote $class; + $path = String::ShellQuote::shell_quote $path; + $class = String::ShellQuote::shell_quote $class; open my $pipe, q#egrep -rs '^[\ \t]*# . "$class' $path". q# | sed 's/ //g' | awk -F '{' '{print $2}' | awk -F '}' '{print $1}' |#; my @cls = <$pipe>; diff --git a/scripts/installation_check.pl b/scripts/installation_check.pl index 6f92bba69..140ecddc0 100755 --- a/scripts/installation_check.pl +++ b/scripts/installation_check.pl @@ -180,9 +180,9 @@ sub kpsewhich { my $type_desc = $type eq 'cls' ? 'document class' : 'package'; eval { require String::ShellQuote; 1 } or warn "can't load String::ShellQuote" && return; - $dw = shell_quote $dw; - my $e_package = shell_quote $package; - my $e_type = shell_quote $type; + $dw = String::ShellQuote::shell_quote $dw; + my $e_package = String::ShellQuote::shell_quote $package; + my $e_type = String::ShellQuote::shell_quote $type; my $exit = system(qq|TEXINPUTS=".:$dw:" kpsewhich $e_package.$e_type > /dev/null|); my $res = $exit > 0 ? 0 : 1;