From eb02daf2ba6963886c99c82e9314717561c2f9d6 Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Fri, 22 Sep 2023 03:05:37 -0600 Subject: [PATCH] Added file checking instead of folder checking --- repo_watcher.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo_watcher.sh b/repo_watcher.sh index d2ffd0c..5bab869 100644 --- a/repo_watcher.sh +++ b/repo_watcher.sh @@ -14,7 +14,7 @@ while true; do cd /root/Repo_Watcher # Clone the repo if it doesn't exist - if [ ! -d "repo" ]; then + if [ -z "$(find repo -maxdepth 0 -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