Mercurial > dotfiles
diff scripts/install.sh @ 418:14492409db21
Add macOS-specific settings
author | zegervdv <zegervdv@me.com> |
---|---|
date | Tue, 27 Jul 2021 15:51:52 +0200 |
parents | d9340ce66658 |
children | 6b6da9305782 |
line wrap: on
line diff
--- a/scripts/install.sh Thu Jul 22 11:52:13 2021 +0200 +++ b/scripts/install.sh Tue Jul 27 15:51:52 2021 +0200 @@ -3,19 +3,24 @@ set -x BIN_DIR="$HOME/bin" -PLATFORM="linux" +if [ "$(uname)" == "Darwin" ]; then + STYLUA_PLATFORM="macos" + PLATFORM="macOS" +else + STYLUA_PLATFORM="linux" + PLATFORM="Linux" +fi echo "Install stylua" STYLUA_VERSION="0.10.0" pushd /tmp -wget https://github.com/JohnnyMorganz/StyLua/releases/download/v${STYLUA_VERSION}/stylua-${STYLUA_VERSION}-${PLATFORM}.zip -unzip stylua-${STYLUA_VERSION}-${PLATFORM}.zip +wget https://github.com/JohnnyMorganz/StyLua/releases/download/v${STYLUA_VERSION}/stylua-${STYLUA_VERSION}-${STYLUA_PLATFORM}.zip +unzip stylua-${STYLUA_VERSION}-${STYLUA_PLATFORM}.zip mv stylua "${BIN_DIR}/stylua" chmod +x "${BIN_DIR}/stylua" popd echo "Install sumneko language server" -PLATFORM="Linux" SUMNEKO_DIR="$HOME/.local/share/sumneko-lua/" mkdir -p "${SUMNEKO_DIR}"