diff options
author | Matthias Maennich <maennich@google.com> | 2019-04-02 11:39:29 +0100 |
---|---|---|
committer | Matthias Maennich <maennich@google.com> | 2019-04-02 11:39:29 +0100 |
commit | bd5e1662377f0aedb3b6d366ac591511d90c291a (patch) | |
tree | 449c38b6595ef84be9d061b63ab59d0e34313a85 | |
parent | 8ce41bf7b9383bc8203d2f69b3edef905a20d7f4 (diff) |
abi/bootstrap: only install packages if missing
As the installation requires administrator privileges, only attempt
installation if the packages are known to be missing.
Change-Id: Ia81157ed100bff28047ed727035560d0ae8b8680
Signed-off-by: Matthias Maennich <maennich@google.com>
-rwxr-xr-x | abi/bootstrap | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/abi/bootstrap b/abi/bootstrap index 27cbcfe..c2f0120 100755 --- a/abi/bootstrap +++ b/abi/bootstrap @@ -29,8 +29,11 @@ fi set -x +PACKAGES="libxml2-dev elfutils libdw-dev" # Install the dependencies. -sudo apt-get install libxml2-dev elfutils libdw-dev +if ! dpkg -s ${PACKAGES} > /dev/null 2>&1 ; then + sudo apt-get install ${PACKAGES} +fi if [ ! -d "${LIBABIGAIL_SRC}" ]; then git clone git://sourceware.org/git/libabigail.git "${LIBABIGAIL_SRC}" |