forked from verifast/verifast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-build.sh
executable file
·52 lines (42 loc) · 1.35 KB
/
setup-build.sh
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
#
# Installs dependencies, builds VeriFast, and runs tests.
# Suitable for home use and for continuous integration.
#
set -e # Stop as soon as a command fails.
set -x # Print what is being executed.
. ./config.sh
if [ $(uname -s) = "Linux" ]; then
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
git wget ca-certificates make m4 \
gcc patch unzip libgtk2.0-dev \
valac libgtksourceview2.0-dev
cd /tmp && curl -Lf https://dl.bintray.com/verifast/verifast/$VFDEPS_NAME-linux.txz | tar xj
elif [ $(uname -s) = "Darwin" ]; then
if [ -z "$GITHUB_ACTIONS" ]; then
# No need to update when running in GitHub Actions; their brew is updated weekly.
brew update
fi
if [ $TRAVIS = "true" ]; then
brew unlink python@2 # See https://github.com/verifast/verifast/issues/191
fi
function brewinstall {
if brew list $1 1>/dev/null 2>/dev/null; then
true;
else
brew install $1;
fi
}
brewinstall wget
brewinstall gtk+
brewinstall gtksourceview
brewinstall vala
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig
sudo mkdir /usr/local/$VFDEPS_NAME
sudo chown -R $(whoami):admin /usr/local/*
cd /usr/local && curl -Lf https://dl.bintray.com/verifast/verifast/$VFDEPS_NAME-macos.txz | tar xj
else
echo "Your OS is not supported by this script."
exit 1
fi