2017-11-22 15:27:35 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Fail on unset variables and command errors
|
|
|
|
set -ue -o pipefail
|
|
|
|
|
|
|
|
# Prevent commands misbehaving due to locale differences
|
|
|
|
export LC_ALL=C
|
|
|
|
|
2018-01-20 22:50:39 +08:00
|
|
|
git fetch origin master:master
|
2017-11-22 15:27:35 +08:00
|
|
|
|
|
|
|
if [ "${LINT#vimlint}" != "$LINT" ]; then
|
2020-09-02 12:28:33 +08:00
|
|
|
git clone --depth=1 https://github.com/wsdjeg/vim-vimlint /tmp/vimlint
|
2018-07-15 20:23:38 +08:00
|
|
|
git clone --depth=1 https://github.com/ynkdir/vim-vimlparser /tmp/vimlparser
|
2017-11-22 15:27:35 +08:00
|
|
|
elif [ "${LINT#vint}" != "$LINT" ]; then
|
2020-08-29 16:46:57 +08:00
|
|
|
pip install --pre vim-vint pathlib enum34 typing
|
|
|
|
vint --version
|
2017-11-22 15:27:35 +08:00
|
|
|
elif [ "${LINT#vader}" != "$LINT" ]; then
|
2019-10-09 22:57:03 +08:00
|
|
|
if [[ ! -d "$HOME/.cache/vimfiles/repos/github.com/Shougo/dein.vim" ]]; then
|
|
|
|
git clone --depth=1 https://github.com/Shougo/dein.vim.git ~/.cache/vimfiles/repos/github.com/Shougo/dein.vim
|
|
|
|
fi
|
|
|
|
.ci/install/linux.sh $VIM_BIN $VIM_TAG
|
|
|
|
if [ "$VIM_BIN" = "nvim" ]; then
|
|
|
|
export PATH="${DEPS}/_neovim/${VIM_TAG}/bin:${PATH}"
|
|
|
|
export VIM="${DEPS}/_neovim/${VIM_TAG}/share/nvim/runtime"
|
|
|
|
else
|
|
|
|
export PATH="${DEPS}/_vim/${VIM_TAG}/bin:${PATH}"
|
|
|
|
export VIM="${DEPS}/_vim/${VIM_TAG}/share/vim"
|
2018-07-16 22:22:46 +08:00
|
|
|
fi
|
|
|
|
|
2019-10-09 22:57:03 +08:00
|
|
|
echo "\$PATH: \"${PATH}\""
|
2018-07-16 22:22:46 +08:00
|
|
|
echo "\$VIM: \"${VIM}\""
|
2019-06-29 19:36:43 +08:00
|
|
|
echo "================= nvim version ======================"
|
2019-10-09 22:57:03 +08:00
|
|
|
$VIM_BIN --version
|
2018-01-20 22:50:39 +08:00
|
|
|
elif [ "$LINT" = "jekyll" ]; then
|
2018-07-15 20:23:38 +08:00
|
|
|
.ci/bootstrap
|
2017-11-22 15:27:35 +08:00
|
|
|
fi
|