Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/lib/version
diff options
context:
space:
mode:
authorChristian Heusel <christian@heusel.eu>2024-04-29 14:46:21 +0200
committerChristian Heusel <christian@heusel.eu>2024-04-29 19:04:46 +0200
commitc484a55cde24457f6a8f6f581f7502da2f873b30 (patch)
treeb673d8f82d3ba2ca4c378d29e881f97c2af54f48 /src/lib/version
parenta46b2d4fb7dee11fcc508c6871b86d9bff8d01ae (diff)
fix(version): dont die if no PKGBUILD is found
So far the commands would stop execution if one of the target directories did not contain a PKGBUILD instead of just reporting failure for that directory. Fix this by replacing the 'die' calls with setting the error for the spinner facility. Component: pkgctl version check Component: pkgctl version upgrade Signed-off-by: Christian Heusel <christian@heusel.eu>
Diffstat (limited to 'src/lib/version')
-rw-r--r--src/lib/version/check.sh11
-rw-r--r--src/lib/version/upgrade.sh8
2 files changed, 13 insertions, 6 deletions
diff --git a/src/lib/version/check.sh b/src/lib/version/check.sh
index ec90eb4..27509a6 100644
--- a/src/lib/version/check.sh
+++ b/src/lib/version/check.sh
@@ -114,10 +114,6 @@ pkgctl_version_check() {
fi
pushd "${path}" >/dev/null
- if [[ ! -f "PKGBUILD" ]]; then
- die "No PKGBUILD found for ${path}"
- fi
-
# update the current terminal spinner status
(( ++current_item ))
pkgctl_version_check_spinner \
@@ -128,6 +124,13 @@ pkgctl_version_check() {
"${current_item}" \
"${#pkgbases[@]}"
+ if [[ ! -f "PKGBUILD" ]]; then
+ result="${BOLD}${path}${ALL_OFF}: no PKGBUILD found"
+ failure+=("${result}")
+ popd >/dev/null
+ continue
+ fi
+
# reset common PKGBUILD variables
unset pkgbase pkgname arch source pkgver pkgrel validpgpkeys
# shellcheck source=contrib/makepkg/PKGBUILD.proto
diff --git a/src/lib/version/upgrade.sh b/src/lib/version/upgrade.sh
index c57171c..70a4659 100644
--- a/src/lib/version/upgrade.sh
+++ b/src/lib/version/upgrade.sh
@@ -111,8 +111,13 @@ pkgctl_version_upgrade() {
fi
pushd "${path}" >/dev/null
+ (( ++current_item ))
+
if [[ ! -f "PKGBUILD" ]]; then
- die "No PKGBUILD found for ${path}"
+ result="${BOLD}${path}${ALL_OFF}: no PKGBUILD found"
+ failure+=("${result}")
+ popd >/dev/null
+ continue
fi
# reset common PKGBUILD variables
@@ -122,7 +127,6 @@ pkgctl_version_upgrade() {
pkgbase=${pkgbase:-$pkgname}
# update the current terminal spinner status
- (( ++current_item ))
pkgctl_version_upgrade_spinner \
"${status_dir}" \
"${#up_to_date[@]}" \