2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00
koreader/.ci/before_install.sh
Frans de Jonge 6542382a0c Travis: git fetch --unshallow for version number
Travis only makes a shallow clone of --depth=50. KOReader is small enough that we can just grab it all. This is necessary to generate the version number, without which some tests will fail.

I'm not entirely sure why something like `git fetch origin master tags/v2015.11` doesn't do the trick, but it doesn't matter much.
2017-04-14 22:45:56 +02:00

18 lines
552 B
Bash
Executable File

#!/usr/bin/env bash
# don't do this for clang
if [ "$CXX" = "g++" ]; then
export CXX="g++-4.8" CC="gcc-4.8"
fi
# in case anything ignores the environment variables, override through PATH
mkdir bin
ln -s "$(which gcc-4.8)" bin/cc
ln -s "$(which gcc-4.8)" bin/gcc
ln -s "$(which c++-4.8)" bin/c++
ln -s "$(which g++-4.8)" bin/g++
# Travis only makes a shallow clone of --depth=50. KOReader is small enough that
# we can just grab it all. This is necessary to generate the version number,
# without which some tests will fail.
git fetch --unshallow