summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2017-05-22 12:49:08 -0400
committerDave Reisner <dreisner@archlinux.org>2017-05-23 15:34:30 -0400
commitaef1401ad4bf3c4c5f5020c548b39802809f6261 (patch)
treebd2fe57685b32ec9c311dde591174684cb82a9ea
parent375b035ee2a50262c8ae429e8825ec6a77c36086 (diff)
downloadasp32-aef1401ad4bf3c4c5f5020c548b39802809f6261.tar.xz
always preserve exit statuses on return
-rw-r--r--archweb.inc.sh2
-rw-r--r--package.inc.sh14
2 files changed, 8 insertions, 8 deletions
diff --git a/archweb.inc.sh b/archweb.inc.sh
index b660c29..15f0442 100644
--- a/archweb.inc.sh
+++ b/archweb.inc.sh
@@ -3,7 +3,7 @@ archweb_get_pkgbase() {
pkgbase=$(curl -s "https://www.archlinux.org/packages/search/json/?q=$1" |
jq -r --arg pkgname "$1" 'limit(1; .results[] | select(.pkgname == $pkgname).pkgbase)')
- [[ $pkgbase ]] || return 1
+ [[ $pkgbase ]] || return
printf '%s\n' "$pkgbase"
}
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