Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8024be0f

Von Wulf Coulmann vor fast 13 Jahren hinzugefügt

  • ID 8024be0f4ce99c6062f8e1858ba991f271647cb7
  • Vorgänger 1f7d4ae3
  • Nachfolger e7fdb1da

Prüfung von LaTeX Abhängigkeiten

Unterschiede anzeigen:

SL/InstallationCheck.pm
54 54
  return eval "use $module $version; 1";
55 55
}
56 56

  
57
sub check_kpsewhich {
58
  my $exit = system("which kpsewhich > /dev/null");
59

  
60
  return $exit > 0 ? 0 : 1;
61
}
62

  
63
sub template_dirs {
64
  my ($path) = @_;
65
  opendir my $dh, $path || die "can't open $path";
66
  my @templates = sort grep { !/^\.\.?$/ } readdir $dh;
67
  close $dh;
68

  
69
  return @templates;
70
}
71

  
72
sub classes_from_latex {
73
  my ($path, $class) = @_;
74
  open my $pipe, q#egrep -rs '^[\ \t]*# . "$class' $path". q# | sed 's/ //g' | awk -F '{' '{print $2}' | awk -F '}' '{print $1}' |#;
75
  my @cls = <$pipe>;
76
  close $pipe;
77

  
78
  # can't use uniq here
79
  my %class_hash = map { $_ => 1 } map { s/\n//; $_ } split ',', join ',', @cls;
80
  return sort keys %class_hash;
81
}
82

  
57 83
my %conditional_dependencies;
58 84

  
59 85
sub check_for_conditional_dependencies {

Auch abrufbar als: Unified diff