-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathrun
executable file
·32 lines (26 loc) · 835 Bytes
/
run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# Use privileged mode (to ignore e.g. $CDPATH).
set -p
# Change to directory of this script.
cd "$( dirname "${BASH_SOURCE[0]}" )" || exit
# Look for existing vader installation.
if ! [ -e vader.vim ]; then
vader_dir=
shopt -s nullglob
vader_file=( "${HOME}"/.vim/*{bundle,plugged}*/vader*/plugin/vader.vim )
if [ -f "${vader_file[0]}" ]; then
# Remove "plugin/vader.vim" suffix.
vader_dir=${vader_file[0]%/*/*}
fi
if [ -d "$vader_dir" ]; then
[[ ! -L vader.vim ]] && ln -s "$vader_dir" vader.vim
else
git clone https://github.com/junegunn/vader.vim.git
fi
fi
echo '(Be patient.. testing can take a while.)'
if [[ $CI = true ]]; then
vim -Nnu vimrc -i NONE +'Vader! feature/*.vader'
else
env HOME=/dev/null vim -Nnesu vimrc -i NONE +'Vader! feature/*.vader'
fi