asdf
This commit is contained in:
parent
a5c5200549
commit
c0408c6560
@ -15,11 +15,11 @@ while true; do
|
|||||||
|
|
||||||
# Clone the repo if it doesn't exist
|
# Clone the repo if it doesn't exist
|
||||||
if [ ! -d "repo" ]; then
|
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..."
|
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 --exclude '.git/' ./ /DATA
|
rsync -av --delete --exclude '.git/' ./ /DATA
|
||||||
curl -d "Repository $REPO_URL doesn't exist locally - Downloading..." $NTFY_URL
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fetch the latest changes
|
# Fetch the latest changes
|
||||||
@ -33,10 +33,10 @@ while true; do
|
|||||||
if [ $LOCAL = $REMOTE ]; then
|
if [ $LOCAL = $REMOTE ]; then
|
||||||
echo "Repository Up-to-date"
|
echo "Repository Up-to-date"
|
||||||
else
|
else
|
||||||
|
curl -d "$REPO_URL Automatically Pulled Update" $NTFY_URL
|
||||||
echo "Pulling Updates from Repository..."
|
echo "Pulling Updates from Repository..."
|
||||||
git pull origin main
|
git pull origin main
|
||||||
rsync -av --delete --exclude '.git/' ./ /DATA
|
rsync -av --delete --exclude '.git/' ./ /DATA
|
||||||
curl -d "$REPO_URL Automatically Pulled Update" $NTFY_URL
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Wait for 5 seconds before the next iteration
|
# Wait for 5 seconds before the next iteration
|
||||||
|
Loading…
x
Reference in New Issue
Block a user