tb-dotfiles/home/.scripts/auto-install.sh
2017-06-05 23:33:17 -04:00

20 lines
655 B
Bash
Executable file

# auto install oh-my-zsh and tpm
if which git > /dev/null 2>&1; then
# if oh-my-zsh is not installed, autoinstall it
if [ ! -e "${ZSH}" ]; then
echo 'oh-my-zsh is missing... autoinstalling now'
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
fi
TPM="${HOME}/.tmux/plugins/tpm"
# if tpm (Tmux Plugin Manager) is not installed, autoinstall it
if [ ! -e "${TPM}" ]; then
git clone https://github.com/tmux-plugins/tpm "${TPM}"
fi
if ! egrep -q 'run.*tpm' "${HOME}/.tmux.conf" 2>&1; then
echo 'adding TPM to ~/.tmux.conf'
echo "run '${HOME}/.tmux/plugins/tpm/tpm'" >> "${HOME}/.tmux.conf"
fi
fi