From 1671adc736ee26b46af9e99724c5ecc88141b042 Mon Sep 17 00:00:00 2001 From: Simon Lin Date: Thu, 5 Nov 2020 11:26:16 +0800 Subject: [PATCH] [bootstrap] show warning but not fail when install llvm@9 failed (#5751) This commit allows bootstrap not to fail but print warning if installing llvm@9 or clang-format-9 or clang-tidy-9 failed. This has been the best practice for installing other pretty tools. --- script/bootstrap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/bootstrap b/script/bootstrap index b2ea32ba6..845c7b0c5 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -59,7 +59,7 @@ install_packages_apt() echo 'Installing pretty tools useful for code contributions...' # add clang-format and clang-tidy for pretty - sudo apt-get --no-install-recommends install -y clang-format-9 clang-tidy-9 + sudo apt-get --no-install-recommends install -y clang-format-9 clang-tidy-9 || echo 'WARNING: could not install clang-format-9 and clang-tidy-9, which is useful if you plan to contribute C/C++ code to the OpenThread project.' # add yapf for pretty python3 -m pip install yapf==0.29.0 || echo 'WARNING: could not install yapf, which is useful if you plan to contribute python code to the OpenThread project.' @@ -103,11 +103,11 @@ install_packages_brew() echo 'Installing pretty tools useful for code contributions...' # add clang-format for pretty - CLANG_FORMAT_VERSION="clang-format version 10" + CLANG_FORMAT_VERSION="clang-format version 9" command -v clang-format-9 || (command -v clang-format && (clang-format --version | grep -q "${CLANG_FORMAT_VERSION}")) || { brew install llvm@9 sudo ln -s "$(brew --prefix llvm@9)/bin/clang-format" /usr/local/bin/clang-format-9 - } + } || echo 'WARNING: could not install llvm@9, which is useful if you plan to contribute C/C++ code to the OpenThread project.' # add yapf for pretty python3 -m pip install yapf || echo 'Failed to install python code formatter yapf. Install it manually if you need.'