diff options
Diffstat (limited to 'install.sh')
-rwxr-xr-x[-rw-r--r--] | install.sh | 54 |
1 files changed, 20 insertions, 34 deletions
diff --git a/install.sh b/install.sh index cfdf3bd..8dd8d7d 100644..100755 --- a/install.sh +++ b/install.sh | |||
@@ -1,35 +1,21 @@ | |||
1 | #!/bin/env bash | ||
2 | |||
1 | # Welcome to Vimax! | 3 | # Welcome to Vimax! |
2 | # | 4 | THIS_DIR=$(dirname $(realpath $0)) |
3 | # This script allows a local installation to some random path and starts | 5 | |
4 | # the vim-EDITOR after installation is finished. That way the configuration | 6 | pushd . |
5 | # can easily be tested. | 7 | |
6 | # | 8 | # Change to this files directory |
7 | # You have just executed this script | 9 | cd $THIS_DIR |
8 | 10 | ||
9 | if [[ ! $EDITOR =~ ^n?g?vim?$ ]]; then | 11 | # Fetch dependencies (git submodules)... |
10 | echo Your EDITOR environment variable is set to \"$EDITOR\" | 12 | git submodule update --init --remote --progress |
11 | echo This script requires it to be some kind of vim or nvim, gvim, vi, ... | 13 | |
12 | echo | 14 | # compile YouCompleteMe |
13 | echo Please run this script with EDITOR=vim sh install.sh | 15 | cd $THIS_DIR/pack/vim/opt/YouCompleteMe |
14 | echo Which will set the EDITOR just temporary for running this script. | 16 | ./install.py --clang-completer |
15 | exit | 17 | |
16 | fi | 18 | |
17 | 19 | ||
18 | cd $(dirname "$0") | 20 | |
19 | 21 | popd | |
20 | echo "working in $(pwd)" | ||
21 | |||
22 | mkdir -p autoload | ||
23 | ln -i -s -b vimrc-full vimrc | ||
24 | |||
25 | $EDITOR -u NORC -N \ | ||
26 | +runtime plugin/netrwPlugin.vim \ | ||
27 | +'new +saveas!\ autoload/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' \ | ||
28 | +'new +saveas!\ vimrc-full http://git.entwicklerseite.de/vim/plain/vimrc-full' \ | ||
29 | +qall | ||
30 | |||
31 | $EDITOR -u vimrc-full -N \ | ||
32 | +'PlugInstall --sync' \ | ||
33 | +qall | ||
34 | |||
35 | $EDITOR -u vimrc-full -N $0 | ||