mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-27 14:14:19 +03:00
Add NvimServer as submodule and add a script for local dev
This commit is contained in:
parent
7758de6097
commit
347e457db1
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -0,0 +1,3 @@
|
||||
[submodule "NvimServer"]
|
||||
path = NvimServer
|
||||
url = git@github.com:qvacua/neovim.git
|
1
NvimServer
Submodule
1
NvimServer
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit b800642b696d32c72e35d9459ea29fddf2534957
|
40
bin/build_nvimserver_for_local_dev.sh
Executable file
40
bin/build_nvimserver_for_local_dev.sh
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
# Executing this script will replace the download step of pre-built NvimServer.
|
||||
set -Eeuo pipefail
|
||||
|
||||
readonly clean=${clean:-true}
|
||||
readonly build_dir_name="build"
|
||||
readonly build_dir_path="./${build_dir_name}"
|
||||
readonly nvimview_dir_path="./NvimView/Sources/NvimView/"
|
||||
|
||||
build_for_local_dev() {
|
||||
local -r nvimserver_path="./NvimServer"
|
||||
pushd ${nvimserver_path} >/dev/null
|
||||
|
||||
if ${clean} ; then
|
||||
xcodebuild -derivedDataPath ${build_dir_path} -configuration Release -scheme NvimServer clean
|
||||
fi
|
||||
|
||||
build_deps=${clean} ./NvimServer/bin/build_libnvim.sh
|
||||
xcodebuild -derivedDataPath ${build_dir_path} -configuration Release -scheme NvimServer build
|
||||
|
||||
popd >/dev/null
|
||||
|
||||
cp -r "./NvimServer/runtime" ${nvimview_dir_path}
|
||||
cp "./NvimServer/${build_dir_path}/Build/Products/Release/NvimServer" ${nvimview_dir_path}
|
||||
cp "${nvimview_dir_path}/com.qvacua.NvimView.vim" "${nvimview_dir_path}/runtime/plugin"
|
||||
}
|
||||
|
||||
|
||||
main() {
|
||||
echo "### Building for local dev"
|
||||
# This script is located in /NvimServer/bin and we have to go to /
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
|
||||
|
||||
build_for_local_dev
|
||||
|
||||
echo "### Built for local dev"
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
main
|
Loading…
Reference in New Issue
Block a user