From 59616162efb4d6b1d66bc9ce7d13129660cf6d11 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Thu, 8 Sep 2011 22:48:34 +0200 Subject: Show a warning and ask for user confirmation before running the bootstrapper. Fixes #8. --- bootstrap.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index 1b810d6..fabc394 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1 +1,6 @@ -git pull && rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" --exclude "README.md" -av . ~ \ No newline at end of file +git pull +read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1 +if [[ $REPLY =~ ^[Yy]$ ]]; then + rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" --exclude "README.md" -av . ~ +fi +echo \ No newline at end of file -- cgit v1.2.3