mirror of
https://git.ludikovsky.name/git/fugitive.git
synced 2024-05-18 14:35:32 +02:00
Asking for confirmation when installing on existing git repository instead of aborting
This commit is contained in:
parent
48e7786203
commit
31dffefdd3
|
@ -50,8 +50,13 @@ fugitive_install_config() {
|
||||||
|
|
||||||
fugitive_install() {
|
fugitive_install() {
|
||||||
if [ -d ".git" ]; then
|
if [ -d ".git" ]; then
|
||||||
echo "There's already a git repository here, aborting install."
|
echo -n "There's already a git repository here, "
|
||||||
exit 1
|
echo "enter 'yes' if you want to continue: "
|
||||||
|
read CONTINUE
|
||||||
|
if [ "$CONTINUE" != "yes" ]; then
|
||||||
|
echo "Okay, aborting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo -n "Creating new git repository... "
|
echo -n "Creating new git repository... "
|
||||||
git init >/dev/null
|
git init >/dev/null
|
||||||
|
|
Loading…
Reference in a new issue