-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathinstall.sh
executable file
·37 lines (31 loc) · 946 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
# Based on https://github.com/codota/TabNine/blob/master/dl_binaries.sh
# Download latest TabNine binaries
set -o errexit
set -o pipefail
set -x
version=${version:-$(curl -sS https://update.tabnine.com/bundles/version)}
case $(uname -s) in
"Darwin")
if [ "$(uname -m)" == "arm64" ]; then
platform="aarch64-apple-darwin"
else
platform="$(uname -m)-apple-darwin"
fi
;;
"Linux")
platform="$(uname -m)-unknown-linux-musl"
;;
*"MINGW64"*)
platform="$(uname -m)-pc-windows-gnu"
;;
esac
# we want the binary to reside inside our plugin's dir
cd "$(dirname "$0")"
path="${version}/${platform}"
curl "https://update.tabnine.com/bundles/${path}/TabNine.zip" --create-dirs -o "binaries/${path}/TabNine.zip"
unzip -o "binaries/${path}/TabNine.zip" -d "binaries/${path}"
rm -rf "binaries/${path}/TabNine.zip"
if [[ "$(uname -s)" != *"MINGW64"* ]]; then
chmod +x "binaries/$path/"*
fi