forked from swift-nav/peregrine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deps.sh
executable file
·66 lines (62 loc) · 1.64 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
#!/usr/bin/env bash
set -e
function install_deps_debian () {
# 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-cython \
python-dev
git submodule update --init
# Build libswiftnav
cd libswiftnav/
mkdir -p build && cd build/
# Build and install libswiftnav
cmake ../
make
sudo make install
cd ../python
python setup.py build && python setup.py install
cd ../../
sudo pip install -r requirements.txt
sudo python setup.py develop
}
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
cd ../python
python setup.py build && python setup.py install
cd ../../
sudo pip install -r requirements.txt
sudo python setup.py develop
}
if [[ "$OSTYPE" == "linux-"* ]]; then
install_deps_debian
elif [[ "$OSTYPE" == "darwin"* ]]; then
install_deps_osx
else
echo "This script does not support this platform. Please file a Github issue!"
exit 1
fi