summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-24 11:04:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-24 11:04:26 +0000
commit95cf05b26301aeae1667fdb5ec37885a12da2c05 (patch)
tree602c19b1c76b52f377f6b093914ae161ab44d61a /perl-install
parent39ef49d8cd180bf286f614247159851b0ddb89e8 (diff)
downloaddrakx-95cf05b26301aeae1667fdb5ec37885a12da2c05.tar
drakx-95cf05b26301aeae1667fdb5ec37885a12da2c05.tar.gz
drakx-95cf05b26301aeae1667fdb5ec37885a12da2c05.tar.bz2
drakx-95cf05b26301aeae1667fdb5ec37885a12da2c05.tar.xz
drakx-95cf05b26301aeae1667fdb5ec37885a12da2c05.zip
(copy_advertising): handle i18n'ed advertising
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install_any.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index b07038609..fce228234 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -788,14 +788,18 @@ sub copy_advertising {
return if $::rootwidth < 800;
- my $f = getFile('Mandrake/share/advertising/list');
+ my $source_dir = "Mandrake/share/advertising";
+ foreach ("." . $o->{lang}, "." . substr($o->{lang},0,2), '') {
+ $f = getFile("$source_dir$_/list") or next;
+ $source_dir = "$source_dir$_";
+ }
if (my @files = <$f>) {
my $dir = "$o->{prefix}/tmp/drakx-images";
mkdir $dir;
unlink glob_("$dir/*");
foreach (@files) {
chomp;
- getAndSaveFile("Mandrake/share/advertising/$_", "$dir/$_");
+ getAndSaveFile("$source_dir/$_", "$dir/$_");
}
@advertising_images = map { "$dir/$_" } @files;
}