Fix install output to stderr.

This commit is contained in:
David Tomaschik
2015-08-30 21:32:00 -07:00
parent 88fae8ded3
commit 215f03af2e

View File

@@ -6,18 +6,21 @@ set errexit
BASEDIR=${BASEDIR:-$HOME/.dotfiles} BASEDIR=${BASEDIR:-$HOME/.dotfiles}
if [ ! -d $BASEDIR ] ; then if [ ! -d $BASEDIR ] ; then
echo "Please install to $BASEDIR!" &>2 echo "Please install to $BASEDIR!" 1>&2
exit 1 exit 1
fi fi
function prerequisites { function prerequisites {
# Prerequisites require git # Prerequisites require git
if ! which git > /dev/null ; then if ! which git > /dev/null ; then
echo 'No git, not installing extras.' > /dev/stderr echo 'No git, not installing extras.' 1>&2
return return
fi fi
if which zsh > /dev/null ; then if which zsh > /dev/null ; then
chsh -s `which zsh` if [ `getent passwd $USER | cut -d: -f7` != `which zsh` ] ; then
echo 'Enter password to change shell.' 1>&2
chsh -s `which zsh`
fi
if [ ! -d $HOME/.oh-my-zsh ] ; then if [ ! -d $HOME/.oh-my-zsh ] ; then
git clone https://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh git clone https://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh
fi fi