File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -11,18 +11,21 @@ name=languageclient
11
11
12
12
try_curl () {
13
13
command -v curl > /dev/null && \
14
- curl --fail --location " $1 " --output bin/$name
14
+ curl --fail --location " $1 " --output bin/$name && \
15
+ curl --fail --location " $1 .sha256" --output bin/$name .sha256
15
16
}
16
17
17
18
try_wget () {
18
19
command -v wget > /dev/null && \
19
- wget --output-document=bin/$name " $1 "
20
+ wget --output-document=bin/$name " $1 " && \
21
+ wget --output-document=bin/$name .sha256 " $1 "
20
22
}
21
23
22
24
download () {
23
25
echo " Downloading bin/${name} ..."
24
26
url=https://github.com/autozimu/LanguageClient-neovim/releases/download/$version /${1}
25
27
if (try_curl " $url " || try_wget " $url " ); then
28
+ sha256sum -c " bin/$name .sha256" || (echo " bin/$name .sha256 file checksum does not match exiting." && exit 1)
26
29
chmod a+x bin/$name
27
30
return
28
31
else
You can’t perform that action at this time.
0 commit comments