From 4cad10e0b041082d690582812e9a420435d001b0 Mon Sep 17 00:00:00 2001 From: Max Niagolov Date: Sat, 8 Apr 2023 21:35:10 +0900 Subject: [PATCH] #4. Add installation checks for cmake and nproc Add installation checks for cmake and nproc in install.sh script --- install.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/install.sh b/install.sh index ffb1661e..72d6e2e0 100644 --- a/install.sh +++ b/install.sh @@ -53,6 +53,20 @@ else fi fi +# check if cmake is installed, if not install it +if [ "$(command -v cmake)" = "" ]; then + echo "cmake not found, installing cmake ..." + sudo apt-get install -y cmake # for Linux + brew install cmake # for macOS +fi + +# check if nproc is installed, if not install it +if [ "$(command -v nproc)" = "" ]; then + echo "nproc not found, installing nproc ..." + sudo apt-get install -y coreutils # for Linux + brew install coreutils # for macOS +fi + # Install venv module echo -n "Checking for venv module..." if python3.11 -m venv env > /dev/null 2>&1; then