Created
January 15, 2015 17:30
-
-
Save newhavengill/11e92538ed89ca7e9c56 to your computer and use it in GitHub Desktop.
Set up dotfiles and vimrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
castles="newhavengill/dotfiles" | |
prompt_castle() { | |
if [[ $2 = y ]]; then | |
def="[Yn]" | |
else | |
def="[yN]" | |
fi | |
read -p "Include the castle $1? $def " answer | |
case "$answer" in | |
y|Y) | |
answer=y | |
;; | |
n|N) | |
answer=n | |
;; | |
*) | |
answer=$2 | |
;; | |
esac | |
[[ $answer = y ]] | |
} | |
if prompt_castle vimrc y; then | |
castles="$castles newhavengill/vimrc" | |
if prompt_castle Vundle.vim y; then | |
castles="$castles gmarik/Vundle.vim" | |
fi | |
fi | |
git clone git://github.com/andsens/homeshick.git $HOME/.homesick/repos/homeshick | |
source $HOME/.homesick/repos/homeshick/homeshick.sh | |
for castle in $castles; do | |
homeshick clone $castle | |
done | |
# vim: ts=2 sw=2 noet ft=sh fdm=marker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment