Asking for confirmation when installing on existing git repository instead of aborting

This commit is contained in:
p4bl0 2011-07-24 17:43:10 +02:00
parent 48e7786203
commit 31dffefdd3
1 changed files with 7 additions and 2 deletions

View File

@ -50,8 +50,13 @@ fugitive_install_config() {
fugitive_install() {
if [ -d ".git" ]; then
echo "There's already a git repository here, aborting install."
exit 1
echo -n "There's already a git repository here, "
echo "enter 'yes' if you want to continue: "
read CONTINUE
if [ "$CONTINUE" != "yes" ]; then
echo "Okay, aborting."
exit 1
fi
fi
echo -n "Creating new git repository... "
git init >/dev/null