aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index 0d03922..89642fb 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -2,9 +2,17 @@
mkdir -p ~/.vim/{backups,swaps,undo}
cd "$(dirname "$0")"
git pull
-read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1
-echo
-if [[ $REPLY =~ ^[Yy]$ ]]; then
+function doIt() {
rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" --exclude "README.md" -av . ~
+}
+if [ "$1" == "--force" -o "$1" == "-f" ]; then
+ doIt
+else
+ 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
fi
-source "$HOME/.bash_profile" \ No newline at end of file
+unset doIt
+source ~/.bash_profile \ No newline at end of file