Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: install dev dependencies in make file #815

Merged
merged 3 commits into from
Apr 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,29 @@ ensure-disk-quota:

tsbs: build
cd $(DIR); sh scripts/run-tsbs.sh

# install dev dependencies
ifeq ($(shell uname), Darwin)
dev-setup:
echo "Detecting macOS system..."
brew --version >/dev/null 2>&1 || { echo "Error: Homebrew is not installed. Exiting..."; exit 1; }
echo "Installing dependencies using Homebrew..."
brew install git curl openssl protobuf cmake
else ifeq ($(shell uname), Linux)
dev-setup:
echo "Detecting Linux system..."
os_id=$(shell awk -F= '/^ID=/{print $$2}' /etc/os-release) && \
MichaelLeeHZ marked this conversation as resolved.
Show resolved Hide resolved
if [ "$$os_id" = "ubuntu" ]; then \
echo "Detected Ubuntu system..."; \
echo "Installing dependencies using apt-get..."; \
sudo apt-get update; \
sudo apt install -y git curl gcc g++ libssl-dev pkg-config protobuf-compiler cmake; \
else \
echo "Error: Unsupported Linux distribution. Exiting..."; \
exit 1; \
fi
else
dev-setup:
echo "Error: Unsupported OS. Exiting..."
exit 1
endif