diff options
author | Dave Reisner <dreisner@archlinux.org> | 2017-05-22 12:49:08 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2017-05-23 15:34:30 -0400 |
commit | aef1401ad4bf3c4c5f5020c548b39802809f6261 (patch) | |
tree | bd2fe57685b32ec9c311dde591174684cb82a9ea /package.inc.sh | |
parent | 375b035ee2a50262c8ae429e8825ec6a77c36086 (diff) | |
download | asp32-aef1401ad4bf3c4c5f5020c548b39802809f6261.tar.xz |
always preserve exit statuses on return
Diffstat (limited to 'package.inc.sh')
-rw-r--r-- | package.inc.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/package.inc.sh b/package.inc.sh index 94949bd..961e39b 100644 --- a/package.inc.sh +++ b/package.inc.sh @@ -26,7 +26,7 @@ package_init() { pkgname=$1 - package_resolve "$pkgname" "$2" || return 1 + package_resolve "$pkgname" "$2" || return (( do_update )) || return 0 @@ -130,7 +130,7 @@ package_export() { IFS=/ read -r repo pkgname <<<"$pkgname" fi - package_init "$pkgname" remote || return 1 + package_init "$pkgname" remote || return if [[ $repo ]]; then subtree=repos/$repo-$OPT_ARCH @@ -150,7 +150,7 @@ package_export() { if (( ! OPT_FORCE )); then # shellcheck disable=SC2154 - mkdir "$startdir/$pkgname" || return 1 + mkdir "$startdir/$pkgname" || return fi log_info 'exporting %s:%s' "$pkgname" "$subtree" @@ -162,13 +162,13 @@ package_checkout() { local remote pkgname=$1 - package_init "$pkgname" remote || return 1 + package_init "$pkgname" remote || return git show-ref -q "refs/heads/$remote/packages/$pkgname" || git branch -qf --no-track {,}"$remote/packages/$pkgname" quiet_git clone "$ASPROOT" --single-branch --branch "$remote/packages/$pkgname" \ - "$startdir/$pkgname" || return 1 + "$startdir/$pkgname" || return git --git-dir="$startdir/$pkgname/.git" config pull.rebase true } @@ -188,7 +188,7 @@ package_get_arches() { declare -A arches pkgname=$1 - package_init "$pkgname" remote || return 1 + package_init "$pkgname" remote || return while read -r _ arch; do arches["$arch"]=1 @@ -202,7 +202,7 @@ package_get_repos() { declare -A repos pkgname=$1 - package_init "$pkgname" remote || return 1 + package_init "$pkgname" remote || return while read -r repo _; do repos["$repo"]=1 |