diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-07-21 12:17:35 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-07-21 12:17:35 +0000 |
commit | 9aa781488c84fd261f9e87c4a643645aa2fe9854 (patch) | |
tree | b2006debbd4705b1e9ce2507e13c7be74cf8650b /perl-install/share/gen_locales.pl | |
parent | dfcf3c678830654ca8eb418472ea9494a9bc1ba3 (diff) | |
download | drakx-9aa781488c84fd261f9e87c4a643645aa2fe9854.tar drakx-9aa781488c84fd261f9e87c4a643645aa2fe9854.tar.gz drakx-9aa781488c84fd261f9e87c4a643645aa2fe9854.tar.bz2 drakx-9aa781488c84fd261f9e87c4a643645aa2fe9854.tar.xz drakx-9aa781488c84fd261f9e87c4a643645aa2fe9854.zip |
build per languages symlinks using the new::during_install__lang2charset
-> this enables doing the same during install when using ramdisk
=> no need to have a locale.cz2 anymore
(this is now possible since the number of special cases is lower than before)
Diffstat (limited to 'perl-install/share/gen_locales.pl')
-rw-r--r-- | perl-install/share/gen_locales.pl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/perl-install/share/gen_locales.pl b/perl-install/share/gen_locales.pl new file mode 100644 index 000000000..ba0f4784e --- /dev/null +++ b/perl-install/share/gen_locales.pl @@ -0,0 +1,16 @@ +#!/usr/bin/perl + +use MDK::Common; +use lang; + +foreach (lang::list()) { + my $LANG = lang::lang2LANG($_); + + my $c = lang::during_install__lang2charset($_) or next; + -e "usr/share/locale/$c" or warn("not handled language $_ ($LANG, $c)\n"), next; + if (my $exist = readlink "usr/share/locale/$LANG") { + $exist eq $c or die "symlink $LANG already exist and is $exist instead of $c\n"; + } else { + symlink $c, "usr/share/locale/$LANG" or die "can't create symlink $LANG (for $_)"; + } +} |