| 1 | #!/usr/bin/env sh |
| 2 | |
| 3 | set -ex |
| 4 | |
| 5 | if [ "$FLATPAK" ]; then |
| 6 | sudo apt-get -y install flatpak flatpak-builder elfutils |
| 7 | flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo |
| 8 | flatpak --noninteractive install --user flathub org.kde.Platform//5.15 |
| 9 | flatpak --noninteractive install --user flathub org.kde.Sdk//5.15 |
| 10 | exit |
| 11 | fi |
| 12 | if [ "$TRAVIS_OS_NAME" = "osx" ]; then |
| 13 | curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py |
| 14 | sudo python get-pip.py |
| 15 | |
| 16 | sudo pip install --upgrade pip |
| 17 | sudo pip install dmgbuild |
| 18 | |
| 19 | export CMAKE_PREFIX_PATH=/usr/local/opt/qt5 |
| 20 | fi |
| 21 | |
| 22 | |
| 23 | if [ "$TRAVIS_OS_NAME" = "linux" ]; then |
| 24 | sudo update-alternatives --install /usr/bin/gcc gcc "/usr/bin/${CC}" 10 |
| 25 | sudo update-alternatives --install /usr/bin/g++ g++ "/usr/bin/${CXX}" 10 |
| 26 | |
| 27 | sudo update-alternatives --set gcc "/usr/bin/${CC}" |
| 28 | sudo update-alternatives --set g++ "/usr/bin/${CXX}" |
| 29 | |
| 30 | wget https://cmake.org/files/v3.15/cmake-3.15.5-Linux-x86_64.sh |
| 31 | sudo sh cmake-3.15.5-Linux-x86_64.sh --skip-license --prefix=/usr/local |
| 32 | fi |