-
Notifications
You must be signed in to change notification settings - Fork 4
/
instdeps.sh
54 lines (51 loc) · 1.33 KB
/
instdeps.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
#!/bin/bash
install_pybind_devel_from_source() {
git clone https://github.com/pybind/pybind11.git
cd pybind11
mkdir build
cd build
cmake ..
make -j6 install
cd ../..
}
install_libarchive_devel_from_source() {
#git clone https://github.com/libarchive/libarchive.git
#cd libarchive
#/bin/sh build/autogen.sh
curl -L https://libarchive.org/downloads/libarchive-3.7.7.tar.gz -o libarchive-3.7.7.tar.gz
tar -xvf libarchive-3.7.7.tar.gz
cd libarchive-3.7.7
./configure
make
make check
make install
cd ..
}
if command -v dnf > /dev/null; then
dnf update
dnf install -y cmake
dnf groupinstall -y "Development Tools"
install_pybind_devel_from_source
install_libarchive_devel_from_source
elif command -v yum > /dev/null; then
yum update
yum install -y cmake
yum groupinstall -y "Development Tools"
install_pybind_devel_from_source
install_libarchive_devel_from_source
elif command -v apt > /dev/null; then
apt update
apt install -y libarchive-dev
apt install -y cmake
apt install -y build-essential
apt install -y pybind11-dev
elif command -v apk > /dev/null; then
apk update
apk add libarchive-dev
apk add cmake
apk add build-base
install_pybind_devel_from_source
else
echo "No package manager found"
exit 1
fi