-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdeps.sh
103 lines (83 loc) · 1.78 KB
/
deps.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Install build and test dependencies.
# This script takes two arguments:
#
# First, the operating system used by the continuous integration
# service. The script does some system-dependent preparations before
# installing a Forth.
#
# Second, the Forth implementation to install.
prepare_linux() {
sudo apt-get update -yqq
install=install_apt
libs32="libc6-i386"
}
prepare_yum() {
install=install_yum
}
prepare_centos() {
install=install_rpm
}
prepare_osx() {
brew update > /dev/null
install=install_brew
}
prepare_gforth() {
true
}
prepare_gforth_linux() {
sudo apt-get remove emacs || true
sudo apt-get remove emacs23 || true
sudo apt-get remove emacs24 || true
sudo apt-get remove emacs25 || true
}
prepare_gforth_centos() {
sudo yum install libtool-ltdl-devel
forth='http://download.opensuse.org/repositories/home:/forthy/CentOS_CentOS-6/x86_64/gforth-0.7.9_20131227-63.1.x86_64.rpm'
}
prepare_pforth() {
true
}
prepare_vfxforth() {
$install $libs32 wget
install=install_download
forth='ftp://public@soton.mpeforth.com/VfxLinEval/vfxforth-eval-4.72-0560.i386.tar.gz'
}
prepare_spforth() {
$install $libs32 wget
install=install_download
forth='http://downloads.sourceforge.net/spf/spf-4.20.tar.gz'
}
prepare_lina() {
$install wget
install=install_download
forth='http://home.hccnet.nl/a.w.m.van.der.horst/lina64-5.3.0.tar.gz'
}
install_apt() {
sudo apt-get install -qy "$@"
}
install_rpm() {
wget -q "$1"
sudo rpm -i --force *.rpm
}
install_yum() {
sudo yum install "$@"
}
install_brew() {
brew install "$@"
}
install_download() {
wget -q "$1" -O- | tar xzf -
}
maybe() {
"$1" 2> /dev/null || true
}
if test -n "$WERCKER_STEP_NAME"; then
sudo() {
"$@"
}
fi
forth="$2"
prepare_$1
prepare_$2
maybe prepare_$2_$1
$install "$forth"