From de1f6ab50ae39c81dbab8c37bf9636c6aaa3ab9d Mon Sep 17 00:00:00 2001 From: Fergus Leen Date: Tue, 17 Jun 2014 19:44:32 +0100 Subject: [PATCH] Check for git repository before cloning --- scripts/devSetup/bootstrap.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/devSetup/bootstrap.sh b/scripts/devSetup/bootstrap.sh index 9d1f34b8e..46099635c 100644 --- a/scripts/devSetup/bootstrap.sh +++ b/scripts/devSetup/bootstrap.sh @@ -58,7 +58,13 @@ checkDependencies deps[@] basicDependenciesErrorHandling if command -v node >/dev/null 2>&1; then checkNodeVersion fi -#install git repository -git clone $repositoryUrl coco -#python ./coco/scripts/devSetup/setup.py -echo "Now copy and paste 'sudo python ./coco/scripts/devSetup/setup.py' into the terminal!" + +#check if a git repository already exists here +if [ -d .git ]; then + echo "A git repository already exists here!" +else + #install git repository + git clone $repositoryUrl coco + #python ./coco/scripts/devSetup/setup.py + echo "Now copy and paste 'sudo python ./coco/scripts/devSetup/setup.py' into the terminal!" +fi