updated by /home/nico/bin/sync-all-repos on bibimbap
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 13s

This commit is contained in:
Nico Schottelius 2025-11-29 17:31:14 +01:00
commit 1208b34f10

View file

@ -8,6 +8,16 @@ fi
set -e
pullpush_repo() {
repo=$1
echo $repo
if [ ! -d $repo ]; then echo "Repo $repo does not exist, skipping"; return; fi
cd $repo
git pull
git push
}
update_repo() {
repo=$1
echo $repo
@ -36,27 +46,23 @@ update_repo() {
REPOLIST="$HOME/.ctt $HOME/bin $HOME/vcs/notes $HOME/vcs/nico-dot-cdist $HOME/vcs/cdist-workdir/dot-cdist $HOME/vcs/ansible-main"
REPOLIST2="$REPOLIST $HOME/.password-store"
PULL_PUSH_REPOS="$HOME/vcs/k8s-config/ $HOME/vcs/ansible-main/"
# First in parallel, then en sequence to spot errors
for repo in ${REPOLIST}; do ( update_repo $repo & ) ; done
for repo in ${PULL_PUSH_REPOS}; do ( pull_repo $repo & ) ; done
echo "Waiting for async process to finish ..."
wait
exit 0
################################################################################
# Old stuff skipped atm
echo "Starting for sync process ..."
for repo in ${REPOLIST}; do update_repo $repo ; done
# Repos we want to sync, but don't want to update the working tree
for repo in \
~/vcs/k8s-config/ \
~/vcs/ansible-main/ \
; do
echo $repo
cd $repo
git pull
git push
done
for repo in ${PULL_PUSH_REPOS}; do pull_repo $repo ; done
# Step 2: pull/push all other repos in ~/vcs/
# We cannot commit as we do not know the state, but we