comparison 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
comparison
equal deleted inserted replaced
417:8dd914d43a65 418:14492409db21
1 #!/usr/bin/env bash 1 #!/usr/bin/env bash
2 2
3 set -x 3 set -x
4 4
5 BIN_DIR="$HOME/bin" 5 BIN_DIR="$HOME/bin"
6 PLATFORM="linux" 6 if [ "$(uname)" == "Darwin" ]; then
7 STYLUA_PLATFORM="macos"
8 PLATFORM="macOS"
9 else
10 STYLUA_PLATFORM="linux"
11 PLATFORM="Linux"
12 fi
7 13
8 echo "Install stylua" 14 echo "Install stylua"
9 STYLUA_VERSION="0.10.0" 15 STYLUA_VERSION="0.10.0"
10 pushd /tmp 16 pushd /tmp
11 wget https://github.com/JohnnyMorganz/StyLua/releases/download/v${STYLUA_VERSION}/stylua-${STYLUA_VERSION}-${PLATFORM}.zip 17 wget https://github.com/JohnnyMorganz/StyLua/releases/download/v${STYLUA_VERSION}/stylua-${STYLUA_VERSION}-${STYLUA_PLATFORM}.zip
12 unzip stylua-${STYLUA_VERSION}-${PLATFORM}.zip 18 unzip stylua-${STYLUA_VERSION}-${STYLUA_PLATFORM}.zip
13 mv stylua "${BIN_DIR}/stylua" 19 mv stylua "${BIN_DIR}/stylua"
14 chmod +x "${BIN_DIR}/stylua" 20 chmod +x "${BIN_DIR}/stylua"
15 popd 21 popd
16 22
17 echo "Install sumneko language server" 23 echo "Install sumneko language server"
18 PLATFORM="Linux"
19 SUMNEKO_DIR="$HOME/.local/share/sumneko-lua/" 24 SUMNEKO_DIR="$HOME/.local/share/sumneko-lua/"
20 mkdir -p "${SUMNEKO_DIR}" 25 mkdir -p "${SUMNEKO_DIR}"
21 26
22 pushd $SUMNEKO_DIR 27 pushd $SUMNEKO_DIR
23 curl -L -o sumneko-lua.vsix $(curl -s https://api.github.com/repos/sumneko/vscode-lua/releases/latest | grep 'browser_' | cut -d\" -f4) 28 curl -L -o sumneko-lua.vsix $(curl -s https://api.github.com/repos/sumneko/vscode-lua/releases/latest | grep 'browser_' | cut -d\" -f4)