Signed-off-by: Cedric Staniewski <[email protected]>
---
 scripts/makepkg.sh.in |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 40367ae..f6b87c2 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -336,7 +336,12 @@ download_file() {
                dlcmd="$dlcmd \"$url\""
        fi
 
-       eval $dlcmd || return $?
+       eval $dlcmd
+       local ret=$?
+       if [ $ret -gt 0 ]; then
+               rm -f -- "$dlfile"
+               return $ret
+       fi
 
        # rename the temporary download file to the final destination
        if [ "$dlfile" != "$file" ]; then
-- 
1.6.5.1


Reply via email to