Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e55f0ed4

Von Sven Schöling vor mehr als 12 Jahren hinzugefügt

Sachen die ans System übergeben werden richtig Quoten.

hat als Seiteneffekt, dass Latex Tests String::ShellQuote brauchen.

Unterschiede anzeigen:

SL/InstallationCheck.pm
71 71

  
72 72
sub classes_from_latex {
73 73
  my ($path, $class) = @_;
74
  eval { use String::ShellQuote; 1 } or warn "can't load String::ShellQuote" && return;
75
  $path  = shell_quote $path;
76
  $class = shell_quote $class;
77

  
74 78
  open my $pipe, q#egrep -rs '^[\ \t]*# . "$class' $path". q# | sed 's/ //g' | awk -F '{' '{print $2}' | awk -F '}' '{print $1}' |#;
75 79
  my @cls = <$pipe>;
76 80
  close $pipe;
scripts/installation_check.pl
95 95
  $package =~ s/[^-_0-9A-Za-z]//g;
96 96
  my $type_desc = $type eq 'cls' ? 'document class' : 'package';
97 97

  
98
  my $exit = system(qq|TEXINPUTS=".:$dw:" kpsewhich $package.$type > /dev/null|);
98
  eval { use String::ShellQuote; 1 } or warn "can't load String::ShellQuote" && return;
99
     $dw         = shell_quote $dw;
100
  my $e_package  = shell_quote $package;
101
  my $e_type     = shell_quote $type;
102

  
103
  my $exit = system(qq|TEXINPUTS=".:$dw:" kpsewhich $e_package.$e_type > /dev/null|);
99 104
  my $res  = $exit > 0 ? 0 : 1;
100 105

  
101 106
  print_result("Looking for LaTeX $type_desc $package", $res);

Auch abrufbar als: Unified diff