]> git.lizzy.rs Git - dragonfireclient.git/blob - util/travis/before_install.sh
fe9243583f09c0f91537b846a5f77cc7a6f1123f
[dragonfireclient.git] / util / travis / before_install.sh
1 #!/bin/bash -e
2
3 echo "Preparing for $TRAVIS_COMMIT_RANGE"
4
5 . util/travis/common.sh
6
7 if [[ ! -z "${CLANG_FORMAT}" ]]; then
8         exit 0
9 fi
10
11 needs_compile || exit 0
12
13 if [[ $PLATFORM == "Unix" ]] || [[ ! -z "${CLANG_TIDY}" ]]; then
14         if [[ $TRAVIS_OS_NAME == "linux" ]] || [[ ! -z "${CLANG_TIDY}" ]]; then
15                 install_linux_deps
16         else
17                 install_macosx_deps
18         fi
19 elif [[ $PLATFORM == "Win32" ]]; then
20         sudo apt-get update
21         sudo apt-get install p7zip-full
22         wget http://minetest.kitsunemimi.pw/mingw-w64-i686_7.1.1_ubuntu14.04.7z -O mingw.7z
23         # buildwin32.sh detects the installed toolchain automatically
24         sudo 7z x -y -o/usr mingw.7z
25 elif [[ $PLATFORM == "Win64" ]]; then
26         sudo apt-get update
27         sudo apt-get install p7zip-full
28         wget http://minetest.kitsunemimi.pw/mingw-w64-x86_64_7.1.1_ubuntu14.04.7z -O mingw.7z
29         sed -e "s|%PREFIX%|x86_64-w64-mingw32|" \
30                 -e "s|%ROOTPATH%|/usr/x86_64-w64-mingw32|" \
31                 < util/travis/toolchain_mingw.cmake.in > util/buildbot/toolchain_mingw64.cmake
32         sudo 7z x -y -o/usr mingw.7z
33 fi