Added code to ignore .git folder when rsyncing.

This commit is contained in:
Nicole Rappe 2023-09-22 01:52:02 -06:00
parent 2bfa8aab9b
commit bd1457965e

View File

@ -18,7 +18,7 @@ while true; do
echo "Repository $REPO_URL doesn't exist locally - Downloading..." echo "Repository $REPO_URL doesn't exist locally - Downloading..."
git clone $REPO_URL repo git clone $REPO_URL repo
cd 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 curl -d "Repository $REPO_URL doesn't exist locally - Downloading..." $NTFY_URL
fi fi
@ -35,7 +35,7 @@ while true; do
elif [ $LOCAL = $BASE ]; then elif [ $LOCAL = $BASE ]; then
echo "Pulling Updates from Repository..." echo "Pulling Updates from Repository..."
git pull origin main git pull origin main
rsync -av --delete ./ /DATA rsync -av --delete --exclude '.git/' ./ /DATA
curl -d "$REPO_URL Automatically Pulled Update" $NTFY_URL curl -d "$REPO_URL Automatically Pulled Update" $NTFY_URL
else else
echo "Data Diverged - How exactly did this happen?" echo "Data Diverged - How exactly did this happen?"