File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -11,18 +11,21 @@ name=languageclient
1111
1212try_curl () {
1313 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
1516}
1617
1718try_wget () {
1819 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 .sha256"
2022}
2123
2224download () {
2325 echo " Downloading bin/${name} ..."
2426 url=https://github.com/autozimu/LanguageClient-neovim/releases/download/$version /${1}
2527 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)
2629 chmod a+x bin/$name
2730 return
2831 else
You can’t perform that action at this time.
0 commit comments