diff --git a/roles/git-clone/files/clone.sh b/roles/git-clone/files/clone.sh index fe7deace05e5389780563c0323b24e44be40e9ed..f5a4253dc042fae932201f2023b2fdde14935b49 100755 --- a/roles/git-clone/files/clone.sh +++ b/roles/git-clone/files/clone.sh @@ -1,15 +1,11 @@ #!/bin/bash GIT_URL="https://code.fbi.h-da.de/pse-ai-at-the-edge/ai-at-the-edge.git" -DIRECTORY_NAME="ai-at-the-edge" +REPO_DIR_NAME="ai-at-the-edge" CLONE_DIRECTORY="$HOME/notebooks" mkdir -p $CLONE_DIRECTORY -cd $CLONE_DIRECTORY -if test -d "$DIRECTORY_NAME"; then - # directory already exists. - exit -else +if [ ! -d "$CLONE_DIRECTORY/$REPO_DIR_NAME" ]; then # directory does not exist. Clone the repo - git clone $GIT_URL $DIRECTORY_NAME -fi \ No newline at end of file + git clone $GIT_URL "$CLONE_DIRECTORY/$REPO_DIR_NAME" +fi