diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-13 01:35:00 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-13 01:35:00 (EDT) |
commit | 2e837e561d9919ef692abe2de7973d025dff065a (patch) | |
tree | 4f41f08c7d331ee6d618fd0b49edd84da94b5275 /src | |
parent | a572faa3b46c12f03a11346db78ed42fabcbeef9 (diff) |
ob-unpacksource: Improve upstream archive counting
Diffstat (limited to 'src')
-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 } |