summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/common-functions11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/common-functions b/lib/common-functions
index 45438cd..6cf0231 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -80,7 +80,7 @@ find_repository_with_commit() {
fi
done
>&2 printf 'find_repository_with_commit: Cannot find repository with commit "%s"\n' "$1"
- exit 1
+ return 2
}
@@ -311,13 +311,14 @@ make_source_info() {
local PKGBUILD
local PKGBUILD_mod
- git_repo=$(find_repository_with_commit "${git_revision}")
-
- if [ -z "${git_repo}" ]; then
+ if ! git_repo=$(find_repository_with_commit "${git_revision}") || \
+ [ -z "${git_repo}" ]; then
return 1
fi
- find_pkgbuilds "${package}" "${repository}" "${git_repo}" "${git_revision}" "${mod_git_revision}"
+ if ! find_pkgbuilds "${package}" "${repository}" "${git_repo}" "${git_revision}" "${mod_git_revision}"; then
+ return 1
+ fi
( # the new shell is intentional