1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-26 23:36:08 +03:00
vimr/bin/download_nvimserver.sh

38 lines
1.0 KiB
Bash
Raw Normal View History

2020-08-16 12:19:47 +03:00
#!/bin/bash
set -Eeuo pipefail
readonly target_dir_path="Carthage/Build/Mac"
readonly nvimserver_dir_path="${target_dir_path}/NvimServer"
download_nvimserver() {
echo "### Downloading NvimServer"
2020-11-16 00:11:01 +03:00
local version
version=$(cat ./resources/nvimserver_version.txt)
readonly version
2020-08-16 12:19:47 +03:00
echo "#### Downloading ${version}"
rm -rf ${nvimserver_dir_path}
rm -rf "${target_dir_path}/NvimServer.tar.bz2"
mkdir -p ${target_dir_path}
curl -o "${target_dir_path}/NvimServer.tar.bz2" -L "https://github.com/qvacua/neovim/releases/download/${version}/NvimServer.tar.bz2"
pushd ${target_dir_path} >/dev/null
tar xf "NvimServer.tar.bz2"
popd >/dev/null
2020-08-18 18:38:55 +03:00
cp -r "${nvimserver_dir_path}/NvimServer" NvimView/Sources/NvimView/
cp -r "${nvimserver_dir_path}/runtime" NvimView/Sources/NvimView/
2020-08-18 18:43:52 +03:00
cp NvimView/Sources/NvimView/com.qvacua.NvimView.vim NvimView/Sources/NvimView/runtime/plugin
2020-08-18 18:38:55 +03:00
2020-08-16 12:19:47 +03:00
echo "### Downloaded NvimServer"
}
main() {
pushd "$(dirname "${BASH_SOURCE[0]}")/.." > /dev/null
2020-11-16 00:11:01 +03:00
download_nvimserver
2020-08-16 12:19:47 +03:00
popd >/dev/null
}
main