diff --git a/repo_watcher.sh b/repo_watcher.sh index bc46797..d2ffd0c 100644 --- a/repo_watcher.sh +++ b/repo_watcher.sh @@ -15,11 +15,11 @@ while true; do # Clone the repo if it doesn't exist if [ ! -d "repo" ]; 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 cd repo rsync -av --delete --exclude '.git/' ./ /DATA - curl -d "Repository $REPO_URL doesn't exist locally - Downloading..." $NTFY_URL fi # Fetch the latest changes @@ -33,10 +33,10 @@ while true; do if [ $LOCAL = $REMOTE ]; then echo "Repository Up-to-date" else + curl -d "$REPO_URL Automatically Pulled Update" $NTFY_URL echo "Pulling Updates from Repository..." git pull origin main rsync -av --delete --exclude '.git/' ./ /DATA - curl -d "$REPO_URL Automatically Pulled Update" $NTFY_URL fi # Wait for 5 seconds before the next iteration