diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-09 09:59:20 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-09 09:59:20 +0000 |
commit | 1de606e4c3eaafd1b1dfe2b2b1aa83153abf0cbc (patch) | |
tree | 2568c988e45d4cbd29bd0fda6e923876c5fecfe9 /perl-install/standalone/draksplash | |
parent | ad3bdacf5b5618285dddbf37ca926681e516beea (diff) | |
download | drakx-1de606e4c3eaafd1b1dfe2b2b1aa83153abf0cbc.tar drakx-1de606e4c3eaafd1b1dfe2b2b1aa83153abf0cbc.tar.gz drakx-1de606e4c3eaafd1b1dfe2b2b1aa83153abf0cbc.tar.bz2 drakx-1de606e4c3eaafd1b1dfe2b2b1aa83153abf0cbc.tar.xz drakx-1de606e4c3eaafd1b1dfe2b2b1aa83153abf0cbc.zip |
(write_boot_thm) simplify through mkdir_p()
Diffstat (limited to 'perl-install/standalone/draksplash')
-rwxr-xr-x | perl-install/standalone/draksplash | 10 |
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'); |