Skip to content

Commit b7e2282

Browse files
committed
Try to fix travis by adding separate configure
1 parent 98907e4 commit b7e2282

2 files changed

Lines changed: 40 additions & 16 deletions

File tree

‎.travis.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: cpp
22

33
install: |
44
cd "$TRAVIS_BUILD_DIR"
5-
./configure
5+
./configure -t
66
77
script: |
88
cd "$TRAVIS_BUILD_DIR"

‎configure‎

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,40 @@
11
#!/usr/bin/env bash
2-
# This cannot be put into makefiles because
3-
# some systems don't have make installed.
4-
sudo apt-get update
5-
sudo apt-get install aptitude
6-
sudo aptitude install build-essential
7-
# C and C++
8-
sudo aptitude install python-software-properties
9-
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
10-
sudo aptitude update
11-
sudo aptitude install gcc-4.8
12-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
13-
sudo aptitude install g++-4.8
14-
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
15-
# Fortran
16-
sudo aptitude install gfortran-4.8
2+
travis=false
3+
y=''
4+
while getopts t OPT; do
5+
case "$OPT" in
6+
t)
7+
travis=true
8+
y='-y'
9+
;;
10+
esac
11+
done
12+
shift $(($OPTIND - 1))
13+
14+
if "$travis"; then
15+
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
16+
fi
17+
sudo apt-get update $y
18+
cmd="sudo apt-get install $y \
19+
build-essential \
20+
python-software-properties \
21+
"
22+
if "$travis"; then
23+
cmd="$cmd \
24+
gcc-4.8 \
25+
g++-4.8 \
26+
gfortran-4.8 \
27+
"
28+
else
29+
cmd="$cmd \
30+
gcc \
31+
g++ \
32+
gfortran \
33+
"
34+
fi
35+
echo "$cmd"
36+
eval "$cmd"
37+
if "$travis"; then
38+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
39+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
40+
fi

0 commit comments

Comments
 (0)