-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
137 lines (127 loc) · 3.99 KB
/
install.sh
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!/bin/sh
# Standalone installer for Unixs
# Original version is created by shoma2da
# https://github.com/shoma2da/neobundle_installer
# Installation directory
BUNDLE_DIR=~/.vim/bundle
INSTALL_DIR="$BUNDLE_DIR/neobundle.vim"
echo "$INSTALL_DIR"
if [ -e "$INSTALL_DIR" ]; then
echo "$INSTALL_DIR already exists!"
fi
NVIM_DIR=~/.config/nvim
NVIM_BUNDLE_DIR="$NVIM_DIR/bundle"
NVIM_INSTALL_DIR="$NVIM_BUNDLE_DIR/neobundle.vim"
echo "$NVIM_INSTALL_DIR"
if [ -e "$NVIM_INSTALL_DIR" ]; then
echo "$NVIM_INSTALL_DIR already exists!"
fi
if [ -e "$INSTALL_DIR" ] && [ -e "$NVIM_INSTALL_DIR" ]; then
exit 1
fi
# check git command
if type git; then
: # You have git command. No Problem.
else
echo 'Please install git or update your path to include the git executable!'
exit 1
fi
# make bundle dir and fetch neobundle
echo "Begin fetching NeoBundle..."
if ! [ -e "$INSTALL_DIR" ]; then
mkdir -p "$BUNDLE_DIR"
git clone https://github.com/Shougo/neobundle.vim "$INSTALL_DIR"
fi
if type nvim > /dev/null 2>&1 && ! [ -e "$NVIM_INSTALL_DIR" ]; then
mkdir -p "$NVIM_BUNDLE_DIR"
git clone https://github.com/Shougo/neobundle.vim "$NVIM_INSTALL_DIR"
fi
echo "Done."
# write initial setting for .vimrc
echo "Please add the following settings for NeoBundle to the top of your .vimrc file:"
{
echo ""
echo ""
echo "\"NeoBundle Scripts-----------------------------"
echo "if &compatible"
echo " set nocompatible \" Be iMproved"
echo "endif"
echo ""
echo "\" Required:"
echo "set runtimepath+=$BUNDLE_DIR/neobundle.vim/"
echo ""
echo "\" Required:"
echo "call neobundle#begin(expand('$BUNDLE_DIR'))"
echo ""
echo "\" Let NeoBundle manage NeoBundle"
echo "\" Required:"
echo "NeoBundleFetch 'Shougo/neobundle.vim'"
echo ""
echo "\" Add or remove your Bundles here:"
echo "NeoBundle 'Shougo/neosnippet.vim'"
echo "NeoBundle 'Shougo/neosnippet-snippets'"
echo "NeoBundle 'tpope/vim-fugitive'"
echo "NeoBundle 'ctrlpvim/ctrlp.vim'"
echo "NeoBundle 'flazz/vim-colorschemes'"
echo ""
echo "\" You can specify revision/branch/tag."
echo "NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' }"
echo ""
echo "\" Required:"
echo "call neobundle#end()"
echo ""
echo "\" Required:"
echo "filetype plugin indent on"
echo ""
echo "\" If there are uninstalled bundles found on startup,"
echo "\" this will conveniently prompt you to install them."
echo "NeoBundleCheck"
echo "\"End NeoBundle Scripts-------------------------"
echo ""
echo ""
}
# write initial setting for ~/.config/nvim/init.vim
if type nvim > /dev/null 2>&1; then
echo "Please add the following settings for NeoBundle to the top of your init.vim file:"
{
echo ""
echo ""
echo "\"NeoBundle Scripts-----------------------------"
echo "if has('vim_starting')"
echo " \" Required:"
echo " set runtimepath+=$NVIM_BUNDLE_DIR/neobundle.vim/"
echo "endif"
echo ""
echo "\" Required:"
echo "call neobundle#begin(expand('$NVIM_BUNDLE_DIR'))"
echo ""
echo "\" Let NeoBundle manage NeoBundle"
echo "\" Required:"
echo "NeoBundleFetch 'Shougo/neobundle.vim'"
echo ""
echo "\" Add or remove your Bundles here:"
echo "NeoBundle 'Shougo/neosnippet.vim'"
echo "NeoBundle 'Shougo/neosnippet-snippets'"
echo "NeoBundle 'tpope/vim-fugitive'"
echo "NeoBundle 'ctrlpvim/ctrlp.vim'"
echo "NeoBundle 'flazz/vim-colorschemes'"
echo ""
echo "\" You can specify revision/branch/tag."
echo "NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' }"
echo ""
echo "\" Required:"
echo "call neobundle#end()"
echo ""
echo "\" Required:"
echo "filetype plugin indent on"
echo ""
echo "\" If there are uninstalled bundles found on startup,"
echo "\" this will conveniently prompt you to install them."
echo "NeoBundleCheck"
echo "\"End NeoBundle Scripts-------------------------"
echo ""
echo ""
}
fi
echo "Done."
echo "Complete setup NeoBundle!"