index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | scripts/makepkg.sh.in | 7 |
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 40367aed..78b69047 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -336,7 +336,12 @@ download_file() { dlcmd="$dlcmd \"$url\"" fi - eval $dlcmd || return $? + local ret=0 + eval "$dlcmd || ret=\$?" + if [ $ret -gt 0 ]; then + [ ! -s "$dlfile" ] && rm -f -- "$dlfile" + return $ret + fi # rename the temporary download file to the final destination if [ "$dlfile" != "$file" ]; then |