Skip to content

Instantly share code, notes, and snippets.

@newhavengill
Created January 15, 2015 17:30
Show Gist options
  • Save newhavengill/11e92538ed89ca7e9c56 to your computer and use it in GitHub Desktop.
Save newhavengill/11e92538ed89ca7e9c56 to your computer and use it in GitHub Desktop.
Set up dotfiles and vimrc
#!/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