From 6b1a0d4706d6b8b7120f26c962a70e37aaed5275 Mon Sep 17 00:00:00 2001 From: Josip Rodin Date: Wed, 12 Jul 2000 19:11:55 +0000 Subject: fixed to work with *.??.html (i think); moved symlink() call after echoing; updated comments CVS version numbers make_links.pl: 1.3 -> 1.4 --- make_links.pl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'make_links.pl') diff --git a/make_links.pl b/make_links.pl index 28aa4341d08..72637e9b04b 100755 --- a/make_links.pl +++ b/make_links.pl @@ -1,11 +1,13 @@ #!/usr/bin/perl -w -# This script creates any missing soft links in the Debian html -# directory on master. These links are necessary so that under content -# negotiation there is a default language. -# Translators shouldn't have any need of this. +# This script creates any missing soft links in the Debian html directory +# on master. These links are necessary so that under content negotiation +# there is a default language. For every .en.html there needs to be +# a .html -> .en.html -# For every .html.en there needs to be a .html -> .html.en +# Translators shouldn't have any need of this. +# Makefiles in webwml/english/ have already been set up to create these +# links while installing files, so there should be no need to run this. $top_dir = "/debian2/web/debian.org"; @@ -27,13 +29,13 @@ sub check_directory() { } foreach $file (@fil_list) { @parts = split('\.', $file); - $lang = pop @parts; $html = pop @parts; + $lang = pop @parts; $name = join('.', @parts); if (defined($html) and $lang =~ /^en$/ and $html eq "html") { if ( ! -e "$curdir/$name.html") { - symlink("$file", "$curdir/$name.html"); print " creating symlink to $curdir/$file\n"; + symlink("$file", "$curdir/$name.html"); } } } -- cgit v1.2.3