index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Cedric Staniewski <cedric@gmx.ca> | 2009-10-21 19:13:36 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-10-24 09:54:57 -0500 |
commit | c6095e103240589895ebdd4b3789c960cb897ed5 (patch) | |
tree | 34a53be3317af5ed91d62e7c697efa189a85a5cf | |
parent | 3758ccbb524b502cc6162324f1b953215b6b970e (diff) |
-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 |