2011-09-05 12:19:31 -06:00
|
|
|
#!/bin/bash
|
|
|
|
cd "$(dirname "${BASH_SOURCE}")"
|
|
|
|
function doIt() {
|
2013-03-17 16:46:42 -06:00
|
|
|
rsync --exclude "oh-my-zsh" --exclude "tmux-powerline" --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" --exclude "README.md" --exclude "setup.sh" -av . ~
|
2011-09-05 12:19:31 -06:00
|
|
|
}
|
|
|
|
if [ "$1" == "--force" -o "$1" == "-f" ]; then
|
2013-03-17 16:46:42 -06:00
|
|
|
doIt
|
2011-09-05 12:19:31 -06:00
|
|
|
else
|
2013-03-17 16:46:42 -06:00
|
|
|
read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1
|
|
|
|
echo
|
|
|
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
|
|
doIt
|
|
|
|
fi
|
2011-09-05 12:19:31 -06:00
|
|
|
fi
|
|
|
|
unset doIt
|
2013-03-17 03:33:15 -06:00
|
|
|
source ~/.bash_profile
|