From 07f31c873f2f7b9594bbb47c223fd8cb6458f259 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Mon, 7 Oct 2019 15:39:28 -0300 Subject: [PATCH] Updating sync script. --- gitsync.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gitsync.sh b/gitsync.sh index 08a4f3b..3d89d0a 100755 --- a/gitsync.sh +++ b/gitsync.sh @@ -8,17 +8,25 @@ # # Setup: # -# git remote add https://github.com/PerryWerneck/pw3270-plugin-hllapi.git +# git remote add github https://github.com/PerryWerneck/lib3270.git # # git push git fetch origin -git checkout master -git merge origin/master +git merge -for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') +REPOS=$(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') + +for repo in ${REPOS} +do + echo "Getting updates from ${repo} ..." + git fetch ${repo} + git merge +done + +for repo in ${REPOS} do echo "Updating ${repo} ..." git push ${repo} -- libgit2 0.21.2