From da2b4b82f455340ff58b7b8fc9769548d7db3c01 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Sat, 25 Jul 2015 15:57:16 -0700 Subject: [PATCH] Install oh-my-zsh if possible. --- install.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install.sh b/install.sh index 7ad975e..197a2d0 100755 --- a/install.sh +++ b/install.sh @@ -10,6 +10,17 @@ if [ ! -d $BASEDIR ] ; then exit 1 fi +function prerequisites { + if which zsh > /dev/null ; then + chsh -s `which zsh` + if [ ! -d $HOME/.oh-my-zsh ] ; then + git clone https://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh + fi + else + echo "ZSH not found!" > /dev/stderr + fi +} + function install_dir { SRCDIR="${1}" find ${SRCDIR} \( -name .git -o \ @@ -24,5 +35,6 @@ function install_dir { done } +prerequisites install_dir "${BASEDIR}" test -d "${BASEDIR}/private_dotfiles" && install_dir "${BASEDIR}/private_dotfiles"