summaryrefslogtreecommitdiffstats
path: root/src/ob-unpacksource.sh
diff options
context:
space:
mode:
authorPatrick 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)
commit2e837e561d9919ef692abe2de7973d025dff065a (patch)
tree4f41f08c7d331ee6d618fd0b49edd84da94b5275 /src/ob-unpacksource.sh
parenta572faa3b46c12f03a11346db78ed42fabcbeef9 (diff)
ob-unpacksource: Improve upstream archive counting
Diffstat (limited to 'src/ob-unpacksource.sh')
-rw-r--r--src/ob-unpacksource.sh12
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
}