diff options
author | Michael Scherer <misc@mandriva.com> | 2005-10-20 09:00:05 +0000 |
---|---|---|
committer | Michael Scherer <misc@mandriva.com> | 2005-10-20 09:00:05 +0000 |
commit | b79c594681832728bcedd984f4badd2c42c2a51a (patch) | |
tree | 2a9d271cb41c5fd35f83199924978db8e11f89fd | |
parent | 07d7eda400c95c039e212aeae53cdff88c34792e (diff) | |
download | bootsplash-b79c594681832728bcedd984f4badd2c42c2a51a.tar bootsplash-b79c594681832728bcedd984f4badd2c42c2a51a.tar.gz bootsplash-b79c594681832728bcedd984f4badd2c42c2a51a.tar.bz2 bootsplash-b79c594681832728bcedd984f4badd2c42c2a51a.tar.xz bootsplash-b79c594681832728bcedd984f4badd2c42c2a51a.zip |
- use rmtree instead of rm_rf ( to not depend on Mdk::Common )
-rwxr-xr-x | rpmbuildupdate | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/rpmbuildupdate b/rpmbuildupdate index 805b70e..cbbf95d 100755 --- a/rpmbuildupdate +++ b/rpmbuildupdate @@ -33,6 +33,7 @@ use File::Basename; use File::Copy; use Cwd; use File::Spec; +use File::Path; use Hdlist; my %config; @@ -48,15 +49,13 @@ sub system_die { system($command) and die $message; } - - sub file_not_found { my ($basename) = @_; ! -f $basename and return 1; # sometimes, the webserver return a webpage when the file is not found, instead of letting wget fails # see wget http://www.wesnoth.org/files/wesnoth-0.7.1.tar.bz2 # So if the file is a html page, then it is a error and it should be removed. - is_html($basename) and do { rm_rf($basename); return 1 }; + is_html($basename) and do { rmtree($basename); return 1 }; return 0; } @@ -112,7 +111,7 @@ sub fetch_http { my $basename = basename($url); my $turl; - rm_rf($basename) if $config{nobuild}; + rmtree($basename) if $config{nobuild}; download($url); foreach ('.tar.gz', '.tgz', '.tar.Z', '.zip') { @@ -349,7 +348,7 @@ sub build { } my $basename = basename($_); - rm_rf("$config{sourcedir}/$basename") if $config{nobuild}; + rmtree("$config{sourcedir}/$basename") if $config{nobuild}; # GNOME: add the major version to the URL automatically # for example: ftp://ftp://ftp.gnome.org/pub/GNOME/sources/ORbit2/ORbit2-2.10.0.tar.bz2 |