From 1de606e4c3eaafd1b1dfe2b2b1aa83153abf0cbc Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 9 Mar 2004 09:59:20 +0000 Subject: (write_boot_thm) simplify through mkdir_p() --- perl-install/standalone/draksplash | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'perl-install/standalone/draksplash') 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'); -- cgit v1.2.1