at master 647 B view raw
1# Setup hook for checking whether a vim command exists 2echo "Sourcing vim-command-check-hook.sh" 3 4vimCommandCheckHook () { 5 echo "Executing vimCommandCheckHook" 6 7 if [ -n "$vimCommandCheck" ]; then 8 echo "Check whether the following modules can be imported: $vimCommandCheck" 9 10 # editorconfig-checker-disable 11 export HOME="$TMPDIR" 12 @vimBinary@ -es -n -u NONE -i NONE --clean -V1 --cmd "set rtp+=$out" \ 13 --cmd "runtime! plugin/*.vim" <<-EOF 14 if exists(":$vimCommandCheck") == 2 15 cquit 0 16 else 17 cquit 1 18 fi 19 EOF 20 fi 21} 22 23echo "Using vimCommandCheckHook" 24appendToVar preDistPhases vimCommandCheckHook 25