summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maennich <maennich@google.com>2019-04-25 15:56:53 +0100
committerMatthias Maennich <maennich@google.com>2019-04-25 15:56:53 +0100
commit96a7e233eced4caae3c6a2bf96b1dadcc2af1628 (patch)
tree8b48c2a20e158b602540bab9f1762566bc04f84f
parent680e80cafde8475e3e4c1f55d67b8547c5c7d2eb (diff)
build_abi.sh: also check for the existence of abidiff
Before we were only checking whether the correct version of abidiff was in PATH. In case there was no abidiff at all, we failed rather loud with a lot of noise from dpkg. Hence do a quick check for abidiff before comparing versions. Change-Id: I056a292556fb519b8ca6880746ee034528750724 Signed-off-by: Matthias Maennich <maennich@google.com>
-rwxr-xr-xbuild_abi.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/build_abi.sh b/build_abi.sh
index 011bfd2..26bf4e0 100755
--- a/build_abi.sh
+++ b/build_abi.sh
@@ -40,8 +40,10 @@ function update_config_for_abi_dump() {
}
# ensure we have a sufficient abigail installation in path before continuing
-if ! dpkg --compare-versions \
- $(abidiff --version | awk '{print $2}') ge 1.6.0; then
+if ! ( hash abidiff 2>/dev/null \
+ && dpkg --compare-versions \
+ $(abidiff --version | awk '{print $2}') ge 1.6.0)
+then
echo "ERROR: no suitable libabigail (>= 1.6.0) in \$PATH."
echo "Did you run abi/bootstrap and followed the instructions?"
exit 1