summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-01-12 11:52:17 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-01-12 11:52:17 +0000
commit0be33a8ce982411a35eb745100b44cad63dc5da9 (patch)
tree3cc9d220b4f9ef0e30c91c9c84e4bea87a57b001
parent3abbaff18aa5575da74e6444facb31d3644cb6ee (diff)
downloaddrakx-backup-do-not-use-0be33a8ce982411a35eb745100b44cad63dc5da9.tar
drakx-backup-do-not-use-0be33a8ce982411a35eb745100b44cad63dc5da9.tar.gz
drakx-backup-do-not-use-0be33a8ce982411a35eb745100b44cad63dc5da9.tar.bz2
drakx-backup-do-not-use-0be33a8ce982411a35eb745100b44cad63dc5da9.tar.xz
drakx-backup-do-not-use-0be33a8ce982411a35eb745100b44cad63dc5da9.zip
make font removing working with --testing
-rwxr-xr-xperl-install/standalone/drakfont6
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont
index 3e6e10935..fa93ef4e7 100755
--- a/perl-install/standalone/drakfont
+++ b/perl-install/standalone/drakfont
@@ -279,6 +279,7 @@ sub print_list() {
}
sub dir_created() {
+ return if $::testing;
-e $drakfont_dir or mkdir_p($drakfont_dir);
-e $drakfont_dir . "/Type1" or mkdir_p($drakfont_dir . "/Type1");
-e $drakfont_dir . "/ttf" or mkdir_p($drakfont_dir . "/ttf");
@@ -391,7 +392,7 @@ sub remove_gs_fonts() {
sub remove_fonts() {
my @list_dir;
- -e $drakfont_dir . "/remove" or mkdir_p($drakfont_dir . "/remove");
+ -e $drakfont_dir . "/remove" or mkdir_p($drakfont_dir . "/remove") if !$::testing;
interactive_progress($pbar, 1, N("done"));
foreach my $i (@font_list) {
@@ -399,6 +400,7 @@ sub remove_fonts() {
if (/.pfb$/ || /.gsf$/ || /.pfm$/ || /.pfa$/) {
system("mv $_ $drakfont_dir/remove ");
} else {
+ next if $::testing;
if (/.ttf$/) {
rm_rf($_);
# rebuild of the fonts.dir and fc-cache files
@@ -422,7 +424,7 @@ sub remove_fonts() {
interactive_progress($pbar2, 0.01, N("xfs restart"));
system("/etc/rc.d/init.d/xfs restart");
system('xset fp rehash');
- -e "/usr/share/ghostscript" and rm_rf("$drakfont_dir/remove");
+ -e "/usr/share/ghostscript" and rm_rf("$drakfont_dir/remove") if !$::testing;
interactive_progress($pbar2, 0.01, N("done"));
}