From 15302e15d1923b9fd680b23aaa9d250cb7338ace Mon Sep 17 00:00:00 2001 From: Sebastien Dupont Date: Thu, 18 Oct 2001 11:01:27 +0000 Subject: update --- perl-install/standalone/drakfont | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'perl-install') diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont index 441214aa2..d816e9014 100755 --- a/perl-install/standalone/drakfont +++ b/perl-install/standalone/drakfont @@ -296,14 +296,26 @@ sub put_font_dir { } -# todo : finir supperssion fontes Types! sub remove_gs_fonts { - if (listlength all("$drakfont_dir/remove ")) { - system (" cd $drakfont_dir/remove && $type1inst "); - my @font_out = cat_("$drakfont_dir/remove/Fontmap"); - my @font_out = cat_("$drakfont_dir/remove/Fontmap"); + my @Fontmap_new; + + if (all("$drakfont_dir/remove")) { + system (" cd $drakfont_dir/remove && $type1inst && touch tttttttttt"); + my @Fontmap_out = cat_("$drakfont_dir/remove/Fontmap"); + my $FontmapGS = `rpm -ql ghostscript | grep Fontmap.GS`; + chomp ($FontmapGS); + my @FontmapGS_list = cat_($FontmapGS); + foreach my $font_gs (@FontmapGS_list) { + my @tmp_list = split (' ',$font_gs); + grep ( $_ =~ /$tmp_list[0]/ , @Fontmap_out) or push @Fontmap_new, $font_gs; + } + print $_ foreach @Fontmap_new; + output($FontmapGS.".tmp2", @Fontmap_new ); + } } + + sub remove_fonts { my @list_dir; my @toto; @@ -311,7 +323,7 @@ sub remove_fonts { foreach my $i (@font_list) { $_ = $i; if ( /.pfb$/ || /.pfm$/ || /.pfa$/ ) { - system ("mv $_ $drakfont_dir/remove "); + system ("cp $_ $drakfont_dir/remove "); } else { rm_rf($i); @@ -330,12 +342,13 @@ sub remove_fonts { # # do type1inst in this path system("cd $i && type1inst") or print "PERL::system command failed during cd or type1inst\n"; } - } - -e "/usr/share/ghostscript" and rm_rf("$drakfont_dir/remove"); } + system ("/etc/rc.d/init.d/xfs restart"); + -e "/usr/share/ghostscript" and rm_rf("$drakfont_dir/remove"); } + $xlsfonts || $windows || @install || @uninstall ? backend_mod() : interactive_mode(); sub backend_mod { -- cgit v1.2.1