-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bash
More file actions
24 lines (21 loc) · 823 Bytes
/
install.bash
File metadata and controls
24 lines (21 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
echo ">>> Start installing rmdecis lib ..."
mkdir -p build
UBUNTU_VER=$(lsb_release -r | awk '{print $2}')
if [ "$UBUNTU_VER" == "20.04" ]; then
echo ">>> Detected Ubuntu 20.04. Enable RMDECIS_DEPLOYMENT."
cmake -DCMAKE_BUILD_TYPE=Release -DRMDECIS_DEPLOYMENT=ON -S . -B ./build -G Ninja
elif [ "$UBUNTU_VER" == "22.04" ]; then
echo ">>> Detected Ubuntu 22.04. Disable RMDECIS_DEPLOYMENT"
cmake -DCMAKE_BUILD_TYPE=Release -S . -B ./build -G Ninja
else
echo "Unsupported distribution. Please install manually."
exit 0
fi
echo ">>> Building rmdecis lib ..."
cmake --build ./build --target rmdecis --parallel $(($(nproc) - 1))
echo ">>> Installing rmdecis lib to system ..."
sudo cmake --install ./build --config Release
echo ">>> Update ldconfig ..."
sudo ldconfig
echo ">>> Lib rmdecis installed."