Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if [ -z ${CLANG_VERSION+x} ]; then | ||
echo "CLANG_VERSION is empty. skip install clang..." | ||
return | ||
fi | ||
|
||
. /etc/os-release | ||
wget -qO - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | ||
sudo add-apt-repository -y "deb http://apt.llvm.org/${VERSION_CODENAME}/ llvm-toolchain-${VERSION_CODENAME}-${CLANG_VERSION} main" | ||
sudo apt-get -y --allow-unauthenticated update | ||
sudo apt-get -qq install "clang-${CLANG_VERSION}" | ||
|
||
|
||
if $INSATLL_CLANG_TOOLS; then | ||
sudo apt-get -y --force-yes -qq install "clang-tools-${CLANG_VERSION}" | ||
CLANG_SLAVES="--slave /usr/bin/scan-build scan-build /usr/bin/scan-build-${CLANG_VERSION}" | ||
fi | ||
|
||
sudo update-alternatives --install /usr/bin/clang clang \ | ||
/usr/bin/clang-${CLANG_VERSION} 360 \ | ||
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_VERSION} \ | ||
${CLANG_SLAVES} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if [ -z ${GCC_VERSION+x} ]; then | ||
echo "GCC_VERSION is empty. skip install gcc..." | ||
return | ||
fi | ||
|
||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | ||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | ||
sudo apt-get -y --allow-unauthenticated update | ||
sudo apt-get -qq install "g++-${GCC_VERSION}" | ||
sudo update-alternatives --install /usr/bin/gcc gcc \ | ||
/usr/bin/gcc-${GCC_VERSION} 90 \ | ||
--slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters