Revision 6348bffb
Von Bernd Bleßmann vor mehr als 10 Jahren hinzugefügt
bin/mozilla/amtemplates.pl | ||
---|---|---|
201 | 201 |
# |
202 | 202 |
if ($format eq "tex") { |
203 | 203 |
# search all .tex-files in template dir (recursively) |
204 |
my $template_dir = $defaults->templates; |
|
204 | 205 |
my @all_files; |
205 | 206 |
find( |
206 | 207 |
sub { |
... | ... | |
209 | 210 |
|
210 | 211 |
my $fname = $File::Find::name; |
211 | 212 |
# remove template dir from name |
212 |
$fname =~ s|^templates/[^/+]/||;
|
|
213 |
$fname =~ s|^$template_dir/||;
|
|
213 | 214 |
# remove .tex from name |
214 | 215 |
$fname =~ s|.tex$||; |
215 | 216 |
|
216 | 217 |
push(@all_files, $fname); |
217 | 218 |
|
218 |
}, $defaults->templates);
|
|
219 |
}, $template_dir);
|
|
219 | 220 |
|
220 | 221 |
# filter all files already set up (i.e. not already in @values) |
221 | 222 |
my @other_files = grep { my $a=$_; not grep {$a eq $_->{value}} @values } @all_files; |
Auch abrufbar als: Unified diff
Template-Pfad aus Pfad-Namen anderer Tex-Dateien richtig entfernen.
Behebt #2483.