summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Dupont <sdupont@mandriva.com>2001-10-11 10:36:31 +0000
committerSebastien Dupont <sdupont@mandriva.com>2001-10-11 10:36:31 +0000
commit01288c52beacce60c2cfea1878b30d69b7b0a55b (patch)
treee5afa04f90758faa98f17248d6a8cce50271783b
parenta50a776121eeeced706c65450db1242de24ee4db (diff)
downloaddrakx-01288c52beacce60c2cfea1878b30d69b7b0a55b.tar
drakx-01288c52beacce60c2cfea1878b30d69b7b0a55b.tar.gz
drakx-01288c52beacce60c2cfea1878b30d69b7b0a55b.tar.bz2
drakx-01288c52beacce60c2cfea1878b30d69b7b0a55b.tar.xz
drakx-01288c52beacce60c2cfea1878b30d69b7b0a55b.zip
correction of install option.
-rwxr-xr-xperl-install/standalone/drakfont30
1 files changed, 11 insertions, 19 deletions
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont
index ab0b4ce51..497f50649 100755
--- a/perl-install/standalone/drakfont
+++ b/perl-install/standalone/drakfont
@@ -177,36 +177,26 @@ sub search_dir_font {
if ( -d $fn ) {
foreach my $i (all($fn)) {
if (($i =~ /.ttf$/i) || ($i =~ /.pfa$/i) || ($i =~ /.pfb$/i) || ($i =~ /.pcf$/i) || ($i =~ /.pcf.gz$/i)) {
- push @font_list_tmp, "$fn$i";
+ push @font_list_tmp, "$i";
+ if (!$replace) {
+ foreach my $i (@font_list_tmp) {
+ !grep /$i/, (@installed_fonts) and push @font_list, "$fn$i";
+ }
+ }
+ else { push @font_list, @font_list_tmp;
+ }
}
}
}
else {
if (($fn =~ /.ttf$/i) || ($fn =~ /.pfa$/i) || ($fn =~ /.pfb$/i) || ($fn =~ /.pcf$/i) || ($fn =~ /.pcf.gz$/i)) {
- push @font_list_tmp, "$fn";
+ !grep /$fn/, (@installed_fonts) and push @font_list, "$fn";
}
}
print "Fonts in directory : ".$_."\n" foreach (@font_list_tmp);
- if (!$replace) {
- foreach my $i (@installed_fonts) {
- foreach my $j (@font_list_tmp) {
- if (( $j =~ !/$i/) && !grep ($j , @font_list)) {
- push @font_list, "$j" ;
- }
- }
- }
- }
- else {
- $font_list_tmp[0] and @font_list = @font_list_tmp;
- }
}
- print ".................................................\n\n";
- print "Font to install : ".$_."\n" foreach (@font_list);
}
-
-# gestion not replace ... have to find fonts not installed
-
sub search_dir_font_uninstall {
my @font_list_tmp = ();
my $fn = $_;
@@ -261,6 +251,8 @@ sub backend_mod {
print ".......Install Specifics Fonts...........\n\n";
search_installed_fonts();
search_dir_font $_ foreach (@install);
+ print ".................................................\n\n";
+ print "Font to install : ".$_."\n" foreach (@font_list);
#put_font_dir();
print "\n...............The End...................\n";
}