summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-04-05 19:21:48 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-04-05 19:21:48 (EDT)
commitd26e9ef9c6a7942e4dc9f9decd264bb4d3231837 (patch)
tree8a6cd5432dea507b2777e24b7d85bb74956e8030 /src
parent908199878720d9ee46a62b5fcc0ebdfc49b24b3c (diff)
Exit on error finding an installable architecture.
Diffstat (limited to 'src')
-rw-r--r--src/opkbuild.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index 25bb041..8856eaf 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -145,8 +145,10 @@ arch=$(opkg print-architecture | sed -n \
's/^arch \([^ -][^ -]*-[^ -][^ -]*-[^ -][^ -]*\) [0-9][0-9]*$/\1/p')
if [ -z "${arch}" ]; then
printf 'opkbuild: Error: No installable architecture found\n' >&2
+ exit 1
elif [ $(echo "${arch}" | wc -l) -gt 1 ]; then
printf 'opkbuild: Error: Multiple installable architectures found\n' >&2
+ exit 1
fi
# Make work area.