summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorp4bl0 <pablo@rauzy.name>2010-07-24 19:47:31 +0200
committerp4bl0 <pablo@rauzy.name>2010-07-24 19:47:31 +0200
commit3f5456e52c017a768b0b8c28c529f5cb945c23b1 (patch)
treef33c4fe2980f4af7e6a920dc6b44caffa89f6545 /install.sh
parentd3c10aea8848f38269667f1e4568d52c37ad877c (diff)
check for existing git repos before install. abort if one exists to avoid overriding files
Diffstat (limited to 'install.sh')
-rw-r--r--install.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/install.sh b/install.sh
index a24f3c3..7cd45a2 100644
--- a/install.sh
+++ b/install.sh
@@ -28,6 +28,10 @@ fugitive_install() {
if [ "$1" != "" ]; then DIR="$1"; fi
if [ ! -d "$DIR" ]; then mkdir -p "$DIR"; fi
cd "$DIR"
+ if [ -d ".git" ]; then
+ echo "There's already a git repository here, aborting install."
+ exit 1
+ fi
echo -n "Creating new git repository... "
git init >/dev/null
echo "done."