2016-07-13 21:18:03 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-08-11 20:49:49 +08:00
|
|
|
# An initial update is required or the cabal cache will be empty and no packages
|
|
|
|
# can be installed.
|
2016-07-13 21:18:03 +08:00
|
|
|
cabal update
|
|
|
|
|
|
|
|
# We need to install happy explicitly, otherwise setup-Simple-Cabal will fail to
|
|
|
|
# install.
|
|
|
|
cabal install happy
|
|
|
|
|
|
|
|
# Fetch hstox.
|
|
|
|
git clone --recursive --depth=1 https://github.com/TokTok/hstox ../hstox
|
|
|
|
|
|
|
|
# Delete all files in the cloned toxcore.
|
|
|
|
rm -rf ../hstox/test/toxcore/toxcore/toxcore
|
|
|
|
# Move the toxcore source files to the hstox test directory.
|
|
|
|
# The reason we move source files instead of the whole git root directory is
|
|
|
|
# that the travis scripts (like this one) need to remain in place.
|
|
|
|
mv toxcore ../hstox/test/toxcore/toxcore
|
|
|
|
|
|
|
|
# In the "install" step, we only run configure, which downloads the required
|
|
|
|
# packages. In the "script" step we then build the actual code.
|
|
|
|
make -C ../hstox configure
|