diff --git a/.travis.prepare.sh b/.travis.prepare.sh new file mode 100644 index 0000000..691cf47 --- /dev/null +++ b/.travis.prepare.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd deps +./getDeps.sh +cd .. diff --git a/.travis.yml b/.travis.yml index 999bd37..bd80cbd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1 +1,3 @@ language: haskell +before_install: + ./travis.prepare.sh diff --git a/deps/getDeps.sh b/deps/getDeps.sh index 43ec790..4514f31 100755 --- a/deps/getDeps.sh +++ b/deps/getDeps.sh @@ -2,10 +2,14 @@ #hack until saucy has 2.0.1 instead of 2.0.0 -sudo apt-get install dialog - -dialog --yesno "Install libSDL2.0.1 from ubuntu trusty?\nCurrently needed for saucy as they only serve 2.0.0 in the repos\n\nThe script will try to download the trusty-packages and resolve dependencies via gdebi" 20 75 -install=${?} +if [ "$1" != "ni" ] +then + sudo apt-get install dialog + dialog --yesno "Install libSDL2.0.1 from ubuntu trusty?\nCurrently needed for saucy as they only serve 2.0.0 in the repos\n\nThe script will try to download the trusty-packages and resolve dependencies via gdebi" 20 75 + install=${?} +else + install=0 +fi if [[ $install -eq 0 ]] then @@ -14,37 +18,37 @@ then if [ ! -f "libsdl2-2.0-0_2.0.1+dfsg1-1ubuntu1_amd64.deb" ] then wget http://de.archive.ubuntu.com/ubuntu/pool/universe/libs/libsdl2/libsdl2-2.0-0_2.0.1+dfsg1-1ubuntu1_amd64.deb - sudo gdebi libsdl2-2.0-0_2.0.1+dfsg1-1ubuntu1_amd64.deb + sudo gdebi --n libsdl2-2.0-0_2.0.1+dfsg1-1ubuntu1_amd64.deb fi if [ ! -f "libsdl2-dev_2.0.1+dfsg1-1ubuntu1_amd64.deb" ] then wget http://de.archive.ubuntu.com/ubuntu/pool/universe/libs/libsdl2/libsdl2-dev_2.0.1+dfsg1-1ubuntu1_amd64.deb - sudo gdebi libsdl2-dev_2.0.1+dfsg1-1ubuntu1_amd64.deb + sudo gdebi --n libsdl2-dev_2.0.1+dfsg1-1ubuntu1_amd64.deb fi if [ ! -f "libsdl2-dbg_2.0.1+dfsg1-1ubuntu1_amd64.deb" ] then wget http://de.archive.ubuntu.com/ubuntu/pool/universe/libs/libsdl2/libsdl2-dbg_2.0.1+dfsg1-1ubuntu1_amd64.deb - sudo gdebi libsdl2-dbg_2.0.1+dfsg1-1ubuntu1_amd64.deb + sudo gdebi --n libsdl2-dbg_2.0.1+dfsg1-1ubuntu1_amd64.deb fi if [ ! -f "libsdl2-ttf-2.0-0_2.0.12+dfsg1-2_amd64.deb" ] then wget http://de.archive.ubuntu.com/ubuntu/pool/universe/libs/libsdl2-ttf/libsdl2-ttf-2.0-0_2.0.12+dfsg1-2_amd64.deb - sudo gdebi libsdl2-ttf-2.0-0_2.0.12+dfsg1-2_amd64.deb + sudo gdebi --n libsdl2-ttf-2.0-0_2.0.12+dfsg1-2_amd64.deb fi if [ ! -f "libsdl2-ttf-dev_2.0.12+dfsg1-2_amd64.deb" ] then wget http://de.archive.ubuntu.com/ubuntu/pool/universe/libs/libsdl2-ttf/libsdl2-ttf-dev_2.0.12+dfsg1-2_amd64.deb - sudo gdebi libsdl2-ttf-dev_2.0.12+dfsg1-2_amd64.deb + sudo gdebi --n libsdl2-ttf-dev_2.0.12+dfsg1-2_amd64.deb fi if [ ! -f "libsdl2-image-2.0-0_2.0.0+dfsg-3_amd64.deb" ] then wget http://de.archive.ubuntu.com/ubuntu/pool/universe/libs/libsdl2-image/libsdl2-image-2.0-0_2.0.0+dfsg-3_amd64.deb - sudo gdebi libsdl2-image-2.0-0_2.0.0+dfsg-3_amd64.deb + sudo gdebi --n libsdl2-image-2.0-0_2.0.0+dfsg-3_amd64.deb fi if [ ! -f "libsdl2-image-dev_2.0.0+dfsg-3_amd64.deb" ] then wget http://de.archive.ubuntu.com/ubuntu/pool/universe/libs/libsdl2-image/libsdl2-image-dev_2.0.0+dfsg-3_amd64.deb - sudo gdebi libsdl2-image-dev_2.0.0+dfsg-3_amd64.deb + sudo gdebi --n libsdl2-image-dev_2.0.0+dfsg-3_amd64.deb fi fi ## hack end