diff options
Diffstat (limited to 'rpmbuildupdate')
-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 |