summaryrefslogtreecommitdiff
path: root/dist/travis/before_script.sh
blob: 8a6f397d9c856376188338dbbba8aaf9f1d2c8fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh

set -e

OS=$(uname -s)

case $OS in
	Linux)
		sudo apt-get update -qq
		sudo apt-get install -y \
			cmake \
			gengetopt \
			libssh-dev
		;;
		
	Darwin)
		brew update
		if test "X$CC" = "Xgcc"; then
			brew install gcc48 --enable-all-languages || true
			brew link --force gcc48 || true
		fi
		brew install \
			cmake \
			libssh \
			gengetopt \
			gettext \
			|| true
		# make sure cmake finds the brew version of gettext
		brew link --force gettext || true
		;;
	
	*)
		echo "ERROR: unknown operating system '$OS'."
		;;
esac