forked from tzachar/cmp-tabnine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·71 lines (65 loc) · 1.72 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/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)}
archi=$(uname -sm)
case "$archi" in
Darwin\ arm64)
platform="aarch64-apple-darwin"
;;
Darwin\ x86_64)
platform="$(uname -m)-apple-darwin"
;;
Linux\ armv5*)
platform="unknown-linux-musl"
;;
Linux\ armv6*)
platform="unknown-linux-musl"
;;
Linux\ armv7*)
platform="unknown-linux-musl"
;;
Linux\ armv8*)
platform="unknown-linux-musl"
;;
Linux\ aarch64*)
platform="unknown-linux-musl"
;;
Linux\ *64)
platform="unknown-linux-musl"
;;
CYGWIN*\ *64)
platform="$(uname -m)-pc-windows-gnu"
;;
MINGW*\ *64)
platform="$(uname -m)-pc-windows-gnu"
;;
MSYS*\ *64)
platform="$(uname -m)-pc-windows-gnu"
;;
Windows*\ *64)
platform="$(uname -m)-pc-windows-gnu"
;;
CYGWIN*\ *32)
platform="$(uname -m)-pc-windows-gnu"
;;
MINGW*\ *32)
platform="$(uname -m)-pc-windows-gnu"
;;
MSYS*\ *32)
platform="$(uname -m)-pc-windows-gnu"
;;
Windows*\ *32)
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
chmod +x binaries/$path/*