summaryrefslogtreecommitdiffstats
path: root/lib/architecture
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-01-29 23:25:33 (EST)
committer P. J. McDermott <pjm@nac.net>2012-01-29 23:25:33 (EST)
commitcd78793d2fe5c61a356e826c12667ec06204519c (patch)
tree950cef629870d4bfa339ccc73045e8ae172bb815 /lib/architecture
parent0c5692f2fc47b4b6216e2807fd4315c28b9425a4 (diff)
Handle platforms in oh_is_buildable().
Diffstat (limited to 'lib/architecture')
-rw-r--r--lib/architecture6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/architecture b/lib/architecture
index 4af24ef..daf8fff 100644
--- a/lib/architecture
+++ b/lib/architecture
@@ -25,11 +25,15 @@ oh_is_buildable()
{
_pkgarch=$(oh_get_field "${1}" Architecture)
+ # "all" or "any".
if [ "${_pkgarch}" = all -o "${_pkgarch}" = any ]; then
return 0
fi
- # XXX: Handle platforms.
+ # Platform.
+ if [ -n "$(echo "${_pkgarch}" | grep -E '^[^-]+$')" ]; then
+ return [ "${_pkgarch}" = "${OH_PLATFORM}" ]
+ fi
# Tokenize the 4-tuple binary architecture.
IFS=- read _pkgcpu _pkgvendor _pkgkernel _pkglibs <<EOF