2021-04-23 18:23:02 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
ROOT_DIR="$(dirname "$(dirname $SCRIPT_DIR)")"
|
|
|
|
|
|
|
|
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
2022-03-28 17:39:36 +03:00
|
|
|
apt install wget
|
|
|
|
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-amd64 -O /usr/bin/bazel
|
|
|
|
chmod +x /usr/bin/bazel
|
2021-04-23 18:23:02 +03:00
|
|
|
apt-get update
|
2022-09-02 18:44:56 +03:00
|
|
|
apt-get -y install llvm make python3.10 python3.10-venv python3.10-dev python-dev \
|
2022-03-28 17:39:36 +03:00
|
|
|
libsqlite3-dev nodejs libev-dev libev-perl python3-distutils wireguard yarn
|
2021-04-23 18:23:02 +03:00
|
|
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
2022-09-02 18:44:56 +03:00
|
|
|
required_packages='bazel coreutils ibazel libev libomp llvm protobuf python3.10 sqlite3'
|
2021-04-23 18:23:02 +03:00
|
|
|
brew tap bazelbuild/tap
|
|
|
|
for required_package in $required_packages; do
|
|
|
|
if brew ls --versions $required_package > /dev/null; then
|
|
|
|
brew upgrade $required_package
|
|
|
|
else
|
|
|
|
brew install $required_package
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
elif [[ "$OSTYPE" == "cygwin" ]]; then
|
|
|
|
exit 1;
|
|
|
|
elif [[ "$OSTYPE" == "msys" ]]; then
|
|
|
|
exit 1;
|
|
|
|
elif [[ "$OSTYPE" == "win32" ]]; then
|
|
|
|
exit 1;
|
|
|
|
elif [[ "$OSTYPE" == "freebsd"* ]]; then
|
|
|
|
exit 1;
|
|
|
|
else
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Successfully installed packages"
|