V2.0.1 aka it's working now

This commit is contained in:
YuruC3
2025-05-11 19:16:07 +02:00
parent 32052f5cd5
commit f3a28cb10f
7 changed files with 65 additions and 13 deletions

View File

@@ -3,7 +3,7 @@ set -e
WORKPTH="/etc/debmirror/"
REPO_DIR="$WORKPTH/Debain-repos"
REPO_URL="https://tea.shupogaki.org/YuruC3/Debain-repos.git"
REPO_URL="${GITURLPROTO}://${GITURL}/${GITREPOPATH}"
# Clone repo only if it doesn't already exist
@@ -15,13 +15,19 @@ fi
cd "$REPO_DIR"
git remote set-url origin "https://${GITEA_TOKEN}@tea.shupogaki.org/YuruC3/Debain-repos.git"
git remote set-url origin "https://${GITEA_TOKEN}@${GITURL}/${GITREPOPATH}"
git config user.name "UpdateBot"
git config user.email "UpdateBot@localhost.local"
# pull changes
git pull
# If anything to commit locally, commit it now
if ! git diff --cached --quiet; then
echo "[$(date)] Committing local changes before pulling"
git commit -m "Auto-commit before pull on $(date -Iseconds)"
fi
# Now pull the latest
git pull --rebase --autostash
# stage files
git add MirrorListV4 MirrorListV6