summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/aur8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/aur b/src/aur
index 6e7cd99..8ef20cf 100755
--- a/src/aur
+++ b/src/aur
@@ -48,6 +48,7 @@ main() {
check_vars libretools DIFFTOOL
local missing_deps=()
+ local ret=0
for _pkg in "$@"; do
# Remove the version
@@ -64,10 +65,13 @@ main() {
msg "Downloading $_pkg..."
local url=https://aur.archlinux.org/packages/${_pkg:0:2}/${_pkg}/$_pkg.tar.gz
- if ! wget -O - -q "$url" | tar xzf - >&2; then
+ set -o pipefail
+ if ! wget -O- "$url" | bsdtar xf -; then
+ ret=$(($ret|2))
error "Couldn't get $_pkg"
continue
fi
+ set +o pipefail
pushd $_pkg &>/dev/null
@@ -135,7 +139,9 @@ main() {
if [[ ${#missing_deps[*]} -gt 0 ]]; then
msg2 "Retrieving missing deps: %s" "${missing_deps[*]}"
"$0" "${missing_deps[@]}"
+ ret=$(($ret|2))
fi
+ return $ret;
}
main "$@"