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"