File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ language: cpp
22
33install : |
44 cd "$TRAVIS_BUILD_DIR"
5- ./configure
5+ ./configure -t
66
77script : |
88 cd "$TRAVIS_BUILD_DIR"
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments