summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-04-22 18:34:48 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-04-22 18:34:48 (EDT)
commit5b00ea717798eabe4bd0324a38d456629321017a (patch)
tree34bcc08d6fce0e59825f669977017a781696cc1d /src
parentdb131a04978faeba3c267c2f4ece2f8ecb8f382e (diff)
Separate architecture table check.
Diffstat (limited to 'src')
-rw-r--r--src/opkbuild.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index 4bd6046..8d6e14a 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -194,11 +194,13 @@ EOF
export OH_HOST_ARCH_CPU OH_HOST_ARCH_KERNEL OH_HOST_ARCH_LIBS
export OH_HOST_PLATFORM="${host_platform}"
-# Look up GNU architecture name and set toolchain environment variables.
+# Make sure the architecture table exists.
if [ ! -f "@@DATADIR@@/opkhelper/archtab" ]; then
printf 'opkbuild: Error: architecture table not found.\n' >&2
exit 1
fi
+
+# Look up GNU architecture name and set toolchain environment variables.
export OH_HOST_ARCH_GNU="$(sed -n \
"s/^${OH_HOST_ARCH_DIST}[ \\t][ \\t]*\\(.*\\)$/\\1/p" \
"@@DATADIR@@/opkhelper/archtab")"