Skip to content

Commit ad9ef4c

Browse files
dependency installer for macOS, Debian/Ubuntu, and RedHat/CentOS
1 parent 1fbaaf8 commit ad9ef4c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

scripts/install_dependencies.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "Installing required dependencies..."
5+
6+
# Detect OS and install packages
7+
if [[ "$OSTYPE" == "darwin"* ]]; then
8+
echo "Detected macOS"
9+
brew update
10+
brew install cmake protobuf boost [email protected]
11+
elif [[ -f /etc/debian_version ]]; then
12+
echo "Detected Debian/Ubuntu"
13+
sudo apt-get update
14+
sudo apt-get install -y build-essential cmake protobuf-compiler libboost-all-dev python3 python3-pip
15+
elif [[ -f /etc/redhat-release ]]; then
16+
echo "Detected RedHat/CentOS"
17+
sudo yum install -y epel-release
18+
sudo yum install -y cmake3 protobuf-compiler boost-devel python3
19+
else
20+
echo "Unsupported OS: $OSTYPE"
21+
exit 1
22+
fi
23+
24+
echo "Dependencies installed successfully."

0 commit comments

Comments
 (0)