From aef1401ad4bf3c4c5f5020c548b39802809f6261 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 22 May 2017 12:49:08 -0400 Subject: always preserve exit statuses on return --- package.inc.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'package.inc.sh') 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 -- cgit v1.2.3-70-g09d2