X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=bin%2Fcreate_index_pages;h=2c62033ddce7a22d6a3155b906ad7b99ce214904;hb=eba34dfe6ebc08cf75e98407fd4c547de3dd2e21;hp=23dd0e69303d887437c8237a71b26ee205b0b271;hpb=f90a95863ab9b0bca61657fdaf0e6a50d265ff66;p=deb%2Fpackages.git diff --git a/bin/create_index_pages b/bin/create_index_pages index 23dd0e6..2c62033 100755 --- a/bin/create_index_pages +++ b/bin/create_index_pages @@ -59,6 +59,7 @@ print "write suite index files ...\n"; foreach my $s (@SUITES) { my $key = $s; mkpath ( "$wwwdir/$key" ); + mkpath ( "$wwwdir/source/$key" ); foreach my $lang (@LANGUAGES) { my $locale = get_locale( $lang ); my $charset = get_locale( $lang ); @@ -70,7 +71,7 @@ foreach my $s (@SUITES) { my %content = ( subsections => [], suite => $s, lang => $lang, charset => $charset, - suites => \@SUITES ); + used_langs => \@LANGUAGES, suites => \@SUITES ); $content{make_search_url} = sub { return &Packages::CGI::make_search_url(@_) }; $content{make_url} = sub { return &Packages::CGI::make_url(@_) }; # needed to work around the limitations of the the FILTER syntax @@ -92,7 +93,6 @@ foreach my $s (@SUITES) { open $pages{$key}{$lang}{index}{fh}, '>', "$wwwdir/$key/index.$lang.html.new" or die "can't open index file for output: $!"; print {$pages{$key}{$lang}{index}{fh}} $template->page( 'suite_index', \%content ); - print {$pages{$key}{$lang}{index}{fh}} $template->trailer( 'index', $lang, \@LANGUAGES ); close $pages{$key}{$lang}{index}{fh} or warn "can't close index file $wwwdir/$key/index.$lang.html.new: $!"; rename( "$wwwdir/$key/index.$lang.html.new", @@ -102,7 +102,6 @@ foreach my $s (@SUITES) { open $pages{$key}{$lang}{source_index}{fh}, '>', "$wwwdir/source/$key/index.$lang.html.new" or die "can't open index file for output: $!"; print {$pages{$key}{$lang}{source_index}{fh}} $template->page( 'suite_index', \%content ); - print {$pages{$key}{$lang}{source_index}{fh}} $template->trailer( 'index', $lang, \@LANGUAGES ); close $pages{$key}{$lang}{source_index}{fh} or warn "can't close index file $wwwdir/source/$key/index.$lang.html.new: $!"; rename( "$wwwdir/source/$key/index.$lang.html.new",