-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.sh
executable file
·27 lines (27 loc) · 1.26 KB
/
setup.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
#!/bin/sh
echo "1/3 Upgrading python pip and installing python modules"
sudo python -m pip install --upgrade pip
python -m pip install pillow requests matplotlib numpy future sounddevice samplerate
echo "2/3 Compilating TDoA binaries and installing packages for GNU Octave (ignore warnings)"
cd TDoA/src
patch -i ../../json_save_patch.diff json_save_cc.cc
rm -f ../../json_save_patch.diff
mkoctfile json_save_cc.cc
mkoctfile read_kiwi_iq_wav.cc
mv json_save_cc.oct read_kiwi_iq_wav.oct ../oct
octave --silent --eval "pkg install -forge control signal"
octave --silent --eval "pkg load signal"
octave --silent --eval "pkg list"
cd ../..
echo "3/3 Patching some python and GNU Octave files"
patch -i kiwiworker_patch.diff ./kiwiclient/kiwi/worker.py
patch -i kiwiclient_patch.diff ./kiwiclient/kiwi/client.py
patch -i kiwiwavreader_patch.diff ./kiwiclient/kiwi/wavreader.py
patch -i kiwirecorder_patch.diff ./kiwiclient/kiwirecorder.py
patch -i microkiwi_patch.diff ./kiwiclient/microkiwi_waterfall.py
patch -i modsocket_patch.diff ./kiwiclient/mod_pywebsocket/util.py
patch -i plot_map_patch.diff ./TDoA/m/tdoa_plot_map.m
patch -i read_data_patch.diff ./TDoA/m/tdoa_read_data.m
rm -f *.diff
echo "The setup is now finished.\nTo start the software from console, type ./directTDoA.py"
sleep 5