diff options
-rw-r--r-- | src/ob-unpacksource.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ob-unpacksource.sh b/src/ob-unpacksource.sh index 26bb537..cec8213 100644 --- a/src/ob-unpacksource.sh +++ b/src/ob-unpacksource.sh @@ -33,17 +33,17 @@ unpack_native() get_upstream_archive() { upstream_ar_base="${OPK_SOURCE}-${OPK_SOURCE_VERSION_UPSTREAM}.orig.tar" - upstream_ar="$(find '..' -name "${upstream_ar_base}*")" - case "$(echo "${upstream_ar}" | grep -v '^$' | wc -l)" in - 0) + upstream_ar="$(printf '%s ' "../${upstream_ar_base}"*)" + case "${upstream_ar}" in + "../${upstream_ar_base}*") ob_info "$(ob_get_msg 'no_sources')" return 1 ;; - 1) - return 0 + *' '*) + ob_error "$(ob_get_msg 'multiple_upstream_sources')" ;; *) - ob_error "$(ob_get_msg 'multiple_upstream_sources')" + return 0 ;; esac } |