File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,22 @@ function add_repository {
1616
1717echo " >>>>> APT: REPOSITORIES..."
1818
19+ if [ " $ADD_UBUNTU_TOOLCHAIN_PPA " = " true" ]; then
20+ echo " >>>>> APT: INSTALL Ubuntu Toolchain PPA"
21+ # an alternative method, if apt-add-repository seems to be unresponsive
22+ VERSION_CODENAME=$( grep -ioP ' ^VERSION_CODENAME=\K.+' /etc/os-release || true)
23+ if [ -z " $VERSION_CODENAME " ]; then
24+ if grep -i trusty /etc/os-release; then
25+ VERSION_CODENAME=trusty
26+ elif grep -i precise /etc/os-release; then
27+ VERSION_CODENAME=precise
28+ fi
29+ fi
30+ echo " VERSION_CODENAME is ${VERSION_CODENAME} "
31+ echo " deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu ${VERSION_CODENAME} main" > " /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-${VERSION_CODENAME} .list"
32+ curl -sSL --retry " ${NET_RETRY_COUNT:- 5} " ' http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F' | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/toolchain-r.gpg
33+ fi
34+
1935if [ -n " ${LLVM_OS} " ]; then
2036 echo " >>>>> APT: INSTALL LLVM repo"
2137 curl -sSL --retry 5 https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/llvm-snapshot.gpg
You can’t perform that action at this time.
0 commit comments