This repository has been archived by the owner on Apr 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathdeps.sh
executable file
·120 lines (115 loc) · 3.46 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/usr/bin/env bash
set -e
function install_deps_ubuntu_maybe () {
# Sudo'd version of travis installation instructions
sudo apt-get update -qq
sudo apt-get install python-software-properties
#sudo add-apt-repository --yes ppa:kalakris/cmake
sudo apt-get update -qq
sudo apt-get -y install cmake \
check \
fftw3 \
libfftw3-dev \
python-pip \
build-essential \
python-numpy \
python-dev \
cython \
python-dev \
python-matplotlib
sudo pip install -U cython
git submodule update --init
# Build libswiftnav
cd libswiftnav/
mkdir -p build && cd build/
# Build and install libswiftnav
cmake ../
make
sudo make install
# Make sure last version of libswiftnav bindings are deleted
# Returns an exception but does uninstall
pip uninstall swiftnav -y 2>/dev/null || true
# Install libswiftnav bindings
cd ../python
sudo pip install -r requirements.txt
sudo python setup.py build
sudo python setup.py install
cd ../../
sudo pip install -r requirements.txt
sudo python setup.py develop
cd .git/hooks; ln -sf ../../git-hooks/* ./; rm README.rst; cd ../..
}
function install_deps_debian_jessie_or_stretch () {
# Sudo'd version of travis installation instructions
sudo apt-get update -qq
sudo apt-get -y install cmake \
check \
fftw3 \
libfftw3-dev \
python-pip \
build-essential \
python-numpy \
python-dev \
cython \
python-dev
# Build and install libswiftnav
git submodule update --init
cd libswiftnav/
mkdir -p build && cd build/
cmake ../
make -j$(nproc)
sudo make install
sudo ldconfig
# Make sure last version of libswiftnav bindings are deleted
# Returns an exception but does uninstall
pip uninstall swiftnav -y 2>/dev/null || true
# Install libswiftnav bindings
cd ../python
sudo pip install -r requirements.txt
sudo python setup.py build
sudo python setup.py install
cd ../../
sudo pip install -r requirements.txt
sudo python setup.py develop
cd .git/hooks; ln -sf ../../git-hooks/* ./; rm README.rst; cd ../..
}
function install_deps_osx () {
# TODO: Add OS X brew installation dependencies
if [[ ! -x /usr/local/bin/brew ]]; then
echo "You're missing Homebrew!"
exit 1
fi
brew install fftw
git submodule update --init
# Build and install libswiftnav
cd libswiftnav/
mkdir -p build && cd build/
# Build and install libswiftnav
cmake ../
make
sudo make install
# Make sure last version of libswiftnav bindings are deleted
# Returns an exception but does uninstall
pip uninstall swiftnav -y 2>/dev/null || true
# Install libswiftnav bindings
cd ../python
sudo pip install -r requirements.txt
sudo python setup.py build
sudo python setup.py install
cd ../../
sudo pip install -r requirements.txt
sudo python setup.py develop
cd .git/hooks; ln -sf ../../git-hooks/* ./; rm README.rst; cd ../..
}
if [[ "$OSTYPE" == "linux-"* ]]; then
if egrep -q "Debian GNU/Linux (jessie|stretch)" /etc/issue; then
install_deps_debian_jessie_or_stretch
else
install_deps_ubuntu_maybe
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
install_deps_osx
else
echo "This script does not support this platform. Please file a Github issue!"
exit 1
fi