2014-07-29 21:49:10 -07:00
|
|
|
#!/bin/zsh
|
2014-04-11 02:55:36 -07:00
|
|
|
|
2014-07-29 21:49:10 -07:00
|
|
|
# In case this file was run via curl
|
2014-06-21 02:20:01 -07:00
|
|
|
[ ! -d ~/.dotfiles ] && git clone https://github.com/hlissner/dotfiles ~/.dotfiles
|
2014-08-27 18:35:08 -07:00
|
|
|
[ ! -d ~/.zprezto ] && git clone --recursive https://github.com/hlissner/prezto ~/.zprezto
|
2014-04-11 02:55:36 -07:00
|
|
|
|
2014-07-29 21:49:10 -07:00
|
|
|
setopt EXTENDED_GLOB
|
2014-07-29 22:14:25 -07:00
|
|
|
for rcfile in "${ZDOTDIR:-$HOME}"/.dotfiles/^(bin|README.md|Gemfile|install.sh)(N); do
|
2014-07-29 21:49:10 -07:00
|
|
|
filep="${ZDOTDIR:-$HOME}/.${rcfile:t}"
|
|
|
|
|
2014-07-29 22:14:25 -07:00
|
|
|
if [ -e "$filep" ]; then
|
|
|
|
echo "~/.${rcfile:t} already existed. Skipping..."
|
|
|
|
continue
|
|
|
|
else
|
|
|
|
echo "Linking ${rcfile:t} to ~/.${rcfile:t}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
ln -s "$rcfile" $filep
|
2014-07-29 21:49:10 -07:00
|
|
|
done
|