replaced case with if statements

This commit is contained in:
radumacocian
2024-08-19 18:14:53 +02:00
parent a2dba81ae5
commit a3613d0381
2 changed files with 27 additions and 30 deletions

View File

@@ -17,8 +17,7 @@ else
fi
echo "----- Downloading NVIM -----"
case "$OSTYPE" in
linux*)
if [[ "$OSTYPE" == "linux"* ]]; then
nvim_path="/opt/nvim-linux64"
echo "Downloading nvim"
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
@@ -28,8 +27,7 @@ case "$OSTYPE" in
echo "Adding NVIM to PATH in ./bashrc"
echo "export PATH="\$PATH:$nvim_path/bin"" >> ~/.bashrc
echo "NVIM added to path, run '. ~/.bashrc' to reload PATH variable"
;;
darwin*)
elif [[ "$OSTYPE" == "darwin"* ]]; then
nvim_path="~/Applications/nvim"
if [ -d "$HOME/Applications/nvim" ]; then
echo "[Skipped] NVIM already installed"
@@ -38,15 +36,14 @@ case "$OSTYPE" in
tar xzf nvim-macos-arm64.tar.gz
mv nvim-macos-arm64 $nvim_path
fi
;;
msys*)
elif [[ "$OSTYPE" == "msys"* ]]; then
if [ "$env:Path" == "*Neovim*" ]; then
echo "[Skipped NVIM already installed"
else
curl -o nvim-win64.msi https://github.com/neovim/neovim/releases/latest/download/nvim-win64.msi
./nvim-win64.msi /passive
fi
esac
fi
if [[ ! -d "$HOME/.local/share/nvim/roslyn" ]] then
echo "----- Roslyn LS not detected: Downloading now -----"