summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-03-09 09:59:20 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-03-09 09:59:20 +0000
commit1de606e4c3eaafd1b1dfe2b2b1aa83153abf0cbc (patch)
tree2568c988e45d4cbd29bd0fda6e923876c5fecfe9 /perl-install
parentad3bdacf5b5618285dddbf37ca926681e516beea (diff)
downloaddrakx-backup-do-not-use-1de606e4c3eaafd1b1dfe2b2b1aa83153abf0cbc.tar
drakx-backup-do-not-use-1de606e4c3eaafd1b1dfe2b2b1aa83153abf0cbc.tar.gz
drakx-backup-do-not-use-1de606e4c3eaafd1b1dfe2b2b1aa83153abf0cbc.tar.bz2
drakx-backup-do-not-use-1de606e4c3eaafd1b1dfe2b2b1aa83153abf0cbc.tar.xz
drakx-backup-do-not-use-1de606e4c3eaafd1b1dfe2b2b1aa83153abf0cbc.zip
(write_boot_thm) simplify through mkdir_p()
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/draksplash10
1 files changed, 3 insertions, 7 deletions
diff --git a/perl-install/standalone/draksplash b/perl-install/standalone/draksplash
index 782b71e7f..c8305f043 100755
--- a/perl-install/standalone/draksplash
+++ b/perl-install/standalone/draksplash
@@ -214,13 +214,9 @@ sub write_boot_thm {
my $globalconf_file = $thm_conf_path.$theme{name}.'/global.config';
my $cfg_file = $thm_conf_path . $theme{name} . "$cfg_path/bootsplash-" . $theme{res}{res} . '.cfg';
#- verify all dir exists or create them
- -d $thm_conf_path.$theme{name}
- or mkdir($thm_conf_path.$theme{name});
- mkdir($thm_conf_path.$theme{name} . $cfg_path) if !-d ($thm_conf_path.$theme{name} . $cfg_path);
- -d $thm_path.$theme{name}
- or mkdir($thm_path.$theme{name});
- -d $thm_path.$theme{name}.'/images/'
- or mkdir($thm_path.$theme{name}.'/images/');
+ foreach my $dir ($thm_conf_path . $theme{name} . $cfg_path, $thm_path.$theme{name} . '/images/') {
+ mkdir_p($dir) if !-d $dir;
+ }
#- copy image to dest by convert
system('convert -scale '.$theme{res}{res} . ' ' . $img_file . ' ' . $thm_path.$theme{name} . '/images/bootsplash-' . $theme{res}{res} . '.jpg');
system('/usr/share/bootsplash/scripts/rewritejpeg '.$thm_path.$theme{name}.'/images/bootsplash-'.$theme{res}{res}.'.jpg');