forked from mutewinter/dot_vim
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathinstall
More file actions
executable file
·38 lines (32 loc) · 1012 Bytes
/
install
File metadata and controls
executable file
·38 lines (32 loc) · 1012 Bytes
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
#!/usr/bin/env bash
DOT_VIM="https://github.com/dansomething/dot_vim.git"
CMDS="git vim"
echo -n "Checking for required commands..."
for cmd in $CMDS; do
hash "$cmd" >/dev/null 2>&1 || {
echo "❌"
echo " $cmd command not found. Please install $cmd."
exit 1
}
done
echo "✅"
if [ ! -s "$HOME/.homesick/repos/homeshick" ]; then
echo "Installing Homeshick to manage dotfiles..."
git clone git://github.com/andsens/homeshick.git "$HOME/.homesick/repos/homeshick"
fi
# shellcheck source=/dev/null
source "$HOME/.homesick/repos/homeshick/homeshick.sh"
# Install dot_vim files
homeshick clone $DOT_VIM
homeshick link dot_vim
if hash nvim >/dev/null 2>&1; then
echo "Installing providers for neovim..."
if hash python3 >/dev/null 2>&1; then
echo "Installing pynvim python3 provider..."
python3 -m pip install --user --upgrade pynvim --break-system-packages
fi
if hash node >/dev/null 2>&1; then
echo "Installing neovim node provider..."
npm install -g neovim
fi
fi