Files
simdjson-simdjson/scripts/addcmakeppa.sh
friendlyanon 55281c01fb Fix unintended Drone CI break (#1266)
* Use 'set -e' as it is portable

* Install git on the i386 images

* Remove CMake PPA from arm64 images

CMake's PPA doesn't actually distribute arm64 binary packages. See
related issues:
https://gitlab.kitware.com/cmake/cmake/-/issues/17923
https://gitlab.kitware.com/cmake/cmake/-/issues/20122

* Use Debian Buster instead of Ubuntu Bionic Beaver

Buster has all the packages in apt that is needed, which is convenient

* Install Clang 6.0 explicitly

Make sure that what gets installed is clang 6.0 as the step name
suggests.
https://packages.debian.org/buster/clang-6.0

* Install CMake from buster-backports

Co-authored-by: friendlyanon <friendlyanon@users.noreply.github.com>
2020-10-30 22:47:40 -04:00

29 lines
759 B
Bash
Executable File

#!/usr/bin/env sh
ACCEPTED_UBUNTU_CODENAMES="focal
bionic
xenial"
printf "%s" "$ACCEPTED_UBUNTU_CODENAMES" | grep -qw "$1"
if [ $? -ne 0 ]; then
echo "'$1' is not a distribution supported by CMake PPA" 1>&2
exit 1
fi
echo "Adding CMake PPA for $1"
# Exit immediately if one of the commands fail below
set -e
# Commands taken from https://apt.kitware.com/
apt-get update -qq
apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common wget
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
apt-add-repository "deb https://apt.kitware.com/ubuntu/ $1 main"
apt-get update -qq
echo "CMake repository added successfully"