]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/predef/tools/ci/linux-cxx-install.sh
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / predef / tools / ci / linux-cxx-install.sh
CommitLineData
1e59de90
TL
1#!/bin/sh
2
3# Usage:
4# LLVM_OS: LLVM OS release to obtain clang binaries. Only needed for clang install.
5# LLVM_VER: The LLVM toolset version to point the repo at.
6# PACKAGES: Compiler packages to install.
7
8if command -v sudo ; then
9 SUDO="sudo -E"
10fi
11OS_ISSUE=`cat /etc/issue | head -n1 | cut -d " " -f1`
12echo ">>>>> OS Issue: ${OS_ISSUE}"
13
14PACKAGES=${PACKAGES:-build-essential}
15
16set -e
17echo ">>>>>"
18echo ">>>>> APT: UPDATE.."
19echo ">>>>>"
20${SUDO} apt-get -o Acquire::Retries=3 update
21echo ">>>>>"
22echo ">>>>> APT: REPO.."
23echo ">>>>>"
24${SUDO} apt-get -o Acquire::Retries=3 -y install software-properties-common
25if test "${OS_ISSUE}" = "Ubuntu" ; then
26 ${SUDO} apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
27fi
28if test -n "${LLVM_OS}" ; then
29 wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
30 ${SUDO} apt-add-repository "deb http://apt.llvm.org/${LLVM_OS}/ llvm-toolchain-${LLVM_OS}-${LLVM_VER} main"
31fi
32echo ">>>>>"
33echo ">>>>> APT: UPDATE.."
34echo ">>>>>"
35${SUDO} apt-get -o Acquire::Retries=3 update
36echo ">>>>>"
37echo ">>>>> APT: INSTALL ${PACKAGES}.."
38echo ">>>>>"
39${SUDO} apt-get -o Acquire::Retries=3 -yq --no-install-suggests --no-install-recommends install ${PACKAGES}
40
41# Use, modification, and distribution are
42# subject to the Boost Software License, Version 1.0. (See accompanying
43# file LICENSE.txt)
44#
45# Copyright René Ferdinand Rivera Morell 2020-2022.