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