From 0ea5553cc1c88034bb0eadc69d635436f561d8c8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Oct 2024 11:56:20 +0900 Subject: [PATCH] updated by /home/nico/bin/sync-all-repos on blind --- sync-all-repos | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sync-all-repos b/sync-all-repos index 8f45557..b864f24 100755 --- a/sync-all-repos +++ b/sync-all-repos @@ -8,14 +8,8 @@ fi set -e -for repo in ~/.ctt \ - ~/bin \ - ~/vcs/notes \ - ~/vcs/nico-dot-cdist \ - ~/vcs/cdist-workdir/dot-cdist \ - ~/vcs/ansible-main \ - ~/.password-store \ - ; do +update_repo() { + repo=$1 echo $repo cd $repo @@ -36,7 +30,15 @@ for repo in ~/.ctt \ git commit -m "updated by $0 on $(hostname)" || true git pull git push -done + +} + +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" + +# First in parallel, then en sequence to spot errors +for repo in "${REPOLIST}; do ( update_repo $repo & ) ; done +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 \