From 704071f485c50f9d90dc9a9c8516fe72de1ce124 Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Fri, 22 Sep 2023 03:12:15 -0600 Subject: [PATCH] Fixed initial clone command --- repo_watcher.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/repo_watcher.sh b/repo_watcher.sh index 5bab869..faea7e1 100644 --- a/repo_watcher.sh +++ b/repo_watcher.sh @@ -1,9 +1,6 @@ #!/bin/bash while true; do - # Make DATA directory at root directory - mkdir -p /DATA - # Set Git credentials git config --global credential.helper 'store --file /tmp/git-credentials' echo "url=$REPO_URL" > /tmp/git-credentials @@ -14,7 +11,7 @@ while true; do cd /root/Repo_Watcher # Clone the repo if it doesn't exist - if [ -z "$(find repo -maxdepth 0 -type f -o -type d 2>/dev/null)" ]; then + if [ -z "$(find /root/Repo_Watcher/repo -maxdepth 1 -mindepth 1 -type f -o -type d 2>/dev/null)" ]; then curl -d "Repository $REPO_URL doesn't exist locally - Downloading..." $NTFY_URL echo "Repository $REPO_URL doesn't exist locally - Downloading..." git clone $REPO_URL repo