dotfiles/install.sh

31 lines
620 B
Bash
Raw Normal View History

2012-02-16 21:14:35 -05:00
#!/bin/bash
2012-05-07 16:26:45 -04:00
# Install oh-my-zsh
if [ ! -d ~/.oh-my-zsh ]; then
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
fi
# Install emacs.d
if [ ! -d ~/.emacs.d ]; then
git clone https://github.com/walkah/emacs.d.git ~/.emacs.d
fi
DOTFILES=`cd $(dirname $0); pwd`
for FILE in $DOTFILES/*; do
NAME=`basename $FILE`
if [ $NAME == 'bin' ]; then
TARGET=$HOME/bin
else
TARGET=$HOME/.$NAME
fi
if [ $NAME != 'install.sh' ]; then
if [ -L $TARGET ]; then
echo "$TARGET exists"
else
ln -vsf $FILE $TARGET
fi
fi
2012-02-16 21:14:35 -05:00
done