Install oh-my-zsh if possible.

This commit is contained in:
David Tomaschik
2015-07-25 15:57:16 -07:00
parent f03e60b30d
commit da2b4b82f4

View File

@@ -10,6 +10,17 @@ if [ ! -d $BASEDIR ] ; then
exit 1 exit 1
fi 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 { function install_dir {
SRCDIR="${1}" SRCDIR="${1}"
find ${SRCDIR} \( -name .git -o \ find ${SRCDIR} \( -name .git -o \
@@ -24,5 +35,6 @@ function install_dir {
done done
} }
prerequisites
install_dir "${BASEDIR}" install_dir "${BASEDIR}"
test -d "${BASEDIR}/private_dotfiles" && install_dir "${BASEDIR}/private_dotfiles" test -d "${BASEDIR}/private_dotfiles" && install_dir "${BASEDIR}/private_dotfiles"