install_deps.sh: fix format, add NixOS support

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-09-13 11:06:07 +02:00 committed by Jakub
parent 8ffbfa3d8f
commit 7594dd4800
1 changed files with 8 additions and 7 deletions

View File

@ -1,13 +1,14 @@
#!/usr/bin/env bash
if [ -x "$(command -v apt)" ]; then
if [[ -x $(command -v apt) ]]; then
apt install -y protobuf-compiler jq
fi
if [ -x "$(command -v pacman)" ]; then
elif [[ -x $(command -v pacman) ]]; then
pacman -Sy protobuf jq --noconfirm
fi
if [ -x "$(command -v brew)" ]; then
elif [[ -x $(command -v brew) ]]; then
brew install protobuf jq
elif [[ -x $(command -v nix-env) ]]; then
nix-env -iA nixos.protobuf3_13
else
echo "ERROR: No known package manager found!" >&2
exit 1
fi