V2.0.1 aka it's working now
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user