From 2d20fb5ed7e03af33aa0243cc8e684fc20b4bb8d Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Thu, 31 Jan 2019 16:02:14 -0200 Subject: [PATCH] Updating sync script. --- gitsync.sh | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) 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