-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate
More file actions
executable file
·36 lines (28 loc) · 1.2 KB
/
update
File metadata and controls
executable file
·36 lines (28 loc) · 1.2 KB
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
#!/usr/bin/env zsh
# http://stackoverflow.com/a/677212
hash git 2>/dev/null || { echo >&2 "git isn't installed. Aborting."; exit 1; }
hash curl 2>/dev/null || { echo >&2 "curl isn't installed. Aborting."; exit 1; }
hash zsh 2>/dev/null || { echo >&2 "zsh isn't installed. Aborting."; exit 1; }
hash tmux 2>/dev/null || { echo >&2 "tmux isn't installed. Aborting."; exit 1; }
hash vim 2>/dev/null || { echo >&2 "vim isn't installed. Aborting."; exit 1; }
TARGET_PATH="$HOME/.dotfiles"
VIMPLUG_PATH="$HOME/.vim/autoload/plug.vim"
TPM_PATH="$HOME/.tmux/plugins/tpm"
if [ ! -d "$TARGET_PATH" ]; then
echo "~/.dotfiles isn't existing. Please run ~/.dotfiles/install"
exit 1
fi
if [ ! -f "$VIMPLUG_PATH" ]; then
echo "Vim Plug isn't installed . Please run ~/.dotfiles/install"
exit 1
fi
# Install Tmux Plugin
if [ ! -d "$TPM_PATH" ]; then
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
else
echo "Tmux Plugin Manager is already installed!"
fi
{ echo "Creating... symbol link with dotbot"; $TARGET_PATH/dotbot; } && \
{ echo "Installing vim plugin"; vim +PlugInstall +qall; } && \
echo "All done!"
bash -c "cd $HOME/.dotfiles && git submodule update --recursive --remote"