diff --git a/gitsync.sh b/gitsync.sh index f6742c7..848806f 100755 --- a/gitsync.sh +++ b/gitsync.sh @@ -6,28 +6,21 @@ # # https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html # -# git remote add bitbucket https://bitbucket.org/pw3270/pw3270-application.git -# git remote add github https://github.com/PerryWerneck/pw3270.git +# Setup: # - -# git remote add github https://github.com/PerryWerneck/pw3270.git -# git push github --all -# -# SUBTREES: +# git remote add github https://github.com/PerryWerneck/lib3270.git # -# https://www.atlassian.com/blog/git/alternatives-to-git-submodule-git-subtree -# # -# git fetch lib3270 - git push git fetch origin git checkout master git merge origin/master -git push github -git push bitbucket - +for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') +do + echo "Updating ${repo} ..." + git push ${repo} +done -- libgit2 0.21.2