Commit 3d452141b048f7278ec89a5e51ec44b768b8e534
1 parent
fa6eab21
Exists in
master
and in
1 other branch
Adding syncronization script.
Showing
1 changed file
with
24 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,24 @@ |
| 1 | +#!/bin/bash | |
| 2 | +# | |
| 3 | +# https://help.github.com/articles/syncing-a-fork/ | |
| 4 | +# | |
| 5 | +# https://help.github.com/articles/configuring-a-remote-for-a-fork/ | |
| 6 | +# | |
| 7 | +# https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html | |
| 8 | +# | |
| 9 | +# Setup: | |
| 10 | +# | |
| 11 | +# git remote add github https://github.com/PerryWerneck/lib3270.git | |
| 12 | +# | |
| 13 | +# | |
| 14 | + | |
| 15 | +git fetch origin | |
| 16 | +git checkout master | |
| 17 | +git merge origin/master | |
| 18 | + | |
| 19 | +for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') | |
| 20 | +do | |
| 21 | + echo "Updating ${repo} ..." | |
| 22 | + git push ${repo} | |
| 23 | +done | |
| 24 | + | ... | ... |