From bd1457965eb90256f6ee434a53afe5dfe31c5abc Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Fri, 22 Sep 2023 01:52:02 -0600 Subject: [PATCH] Added code to ignore .git folder when rsyncing. --- repo_watcher.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repo_watcher.sh b/repo_watcher.sh index afdea44..d104b6a 100644 --- a/repo_watcher.sh +++ b/repo_watcher.sh @@ -18,7 +18,7 @@ while true; do echo "Repository $REPO_URL doesn't exist locally - Downloading..." git clone $REPO_URL repo cd repo - rsync -av --delete ./ /DATA + rsync -av --delete --exclude '.git/' ./ /DATA curl -d "Repository $REPO_URL doesn't exist locally - Downloading..." $NTFY_URL fi @@ -35,7 +35,7 @@ while true; do elif [ $LOCAL = $BASE ]; then echo "Pulling Updates from Repository..." git pull origin main - rsync -av --delete ./ /DATA + rsync -av --delete --exclude '.git/' ./ /DATA curl -d "$REPO_URL Automatically Pulled Update" $NTFY_URL else echo "Data Diverged - How exactly did this happen?"