Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ec77bc78

Von Bernd Bleßmann vor mehr als 6 Jahren hinzugefügt

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.

Unterschiede anzeigen:

SL/InstallationCheck.pm
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>;
scripts/installation_check.pl
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;

Auch abrufbar als: Unified diff