mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Fix install output to stderr.
This commit is contained in:
@@ -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
|
||||||
|
if [ `getent passwd $USER | cut -d: -f7` != `which zsh` ] ; then
|
||||||
|
echo 'Enter password to change shell.' 1>&2
|
||||||
chsh -s `which zsh`
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user