diff options
author | Josip Rodin <joy> | 2000-07-12 19:11:55 +0000 |
---|---|---|
committer | Josip Rodin <joy> | 2000-07-12 19:11:55 +0000 |
commit | 6b1a0d4706d6b8b7120f26c962a70e37aaed5275 (patch) | |
tree | d7da85ebeaa6c8ebcca7ea3c4fa6b66a1688e753 /make_links.pl | |
parent | d306da1b0312d7f7401ad30092467b5985235c1b (diff) |
fixed to work with *.??.html (i think); moved symlink() call after echoing; updated comments
CVS version numbers
make_links.pl: 1.3 -> 1.4
Diffstat (limited to 'make_links.pl')
-rwxr-xr-x | make_links.pl | 16 |
1 files changed, 9 insertions, 7 deletions
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 <file>.en.html there needs to be +# a <file>.html -> <file>.en.html -# For every <file>.html.en there needs to be a <file>.html -> <file>.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"); } } } |