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 \