nix: fix setup.sh script when running on MacOS

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-01-10 16:21:47 +01:00
parent 56a1df03f0
commit da76200433
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931

View File

@ -28,12 +28,12 @@ function install_nix() {
fi fi
} }
if [[ ! -x "$(command -v git)" ]]; then if [[ ! -x "$(command -v curl)" ]]; then
echo -e "${RED}The 'curl' utility is required for Nix installation.${RST}" >&2 echo -e "${RED}The 'curl' utility is required for Nix installation.${RST}" >&2
exit 1 exit 1
fi fi
if [[ "$(source /etc/os-release && echo "${NAME}")" == *NixOS* ]]; then if [[ "$(source /etc/os-release 2>/dev/null && echo "${NAME}")" == *NixOS* ]]; then
echo -e "${GRN}Already running NixOS.${RST}" echo -e "${GRN}Already running NixOS.${RST}"
exit exit
fi fi