-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeps.sh
executable file
·47 lines (33 loc) · 883 Bytes
/
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
# CHANGE THE NUMBER OF CORES HERE
core_num=8
sudo="sudo"
# Installing deps....
arch="$(command -v apt)" # Testing see what dist we're on
if [[ $arch != "" ]]; then
$sudo apt -y install $(cat deps_deb.txt)
else
$sudo pacman -S --needed $(cat deps_arch.txt)
fi
# Installing OpenCV
git clone https://github.com/opencv/opencv.git
git clone https://github.com/opencv/opencv_contrib.git
cd opencv
mkdir -p build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH=`pwd`/opencv_contrib/modules -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j$core_num
$sudo make install
cd ../..
# Installing Fann
git clone https://github.com/libfann/fann
cd fann/bin
cmake ..
make -j$core_num
$sudo make install
cd ../..
echo -n "Do you want to remove source files? yes/no >"
read remove
if [[ $remove == "yes" ]]; then
rm -rf opencv opencv_contrib fann
fi
exit