nixpkgs-suyu/pkgs/misc/vim-plugins/vim-gen-doc-hook.sh
Matthieu Coudron 354b186402 vimUtils.vimGenDocHook: dont copy the folder (again)
The files are installed via build-vim-plugin. Doing that again is a waste of resources, worse it can create errors
2021-09-12 19:19:13 +02:00

30 lines
781 B
Bash

echo "Sourcing vim-gen-doc-hook"
# the doc folder is copied via the copy_directories entry of the rockspec
# in the folder gitsigns.nvim-scm-1-rocks/gitsigns.nvim/scm-1
vimPluginGenTags() {
echo "Executing vimPluginGenTags"
target="$out/@rtpPath@/$pname"
mkdir -p $out/@rtpPath@
# build help tags
if [ -d "$target/doc" ]; then
echo "Building help tags"
if ! @vimBinary@ -N -u NONE -i NONE -n -E -s -V1 -c "helptags $target/doc" +quit!; then
echo "Failed to build help tags!"
exit 1
fi
else
echo "No docs available"
fi
if [ -n "$addonInfo" ]; then
echo "$addonInfo" > $target/addon-info.json
fi
echo "Finished executing vimPluginInstallPhase"
}
preFixupHooks+=(vimPluginGenTags)