Commit 5656d9754ef81ac6f046297b4509d96a53699769
1 parent
bd4ed045
Exists in
master
and in
3 other branches
Adjustments in the git syncronization script.
Showing
1 changed file
with
11 additions
and
3 deletions
Show diff stats
gitsync.sh
| ... | ... | @@ -15,10 +15,18 @@ |
| 15 | 15 | git push |
| 16 | 16 | |
| 17 | 17 | git fetch origin |
| 18 | -git checkout master | |
| 19 | -git merge origin/master | |
| 18 | +git merge | |
| 20 | 19 | |
| 21 | -for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') | |
| 20 | +REPOS=$(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') | |
| 21 | + | |
| 22 | +for repo in ${REPOS} | |
| 23 | +do | |
| 24 | + echo "Getting updates from ${repo} ..." | |
| 25 | + git fetch ${repo} | |
| 26 | + git merge | |
| 27 | +done | |
| 28 | + | |
| 29 | +for repo in ${REPOS} | |
| 22 | 30 | do |
| 23 | 31 | echo "Updating ${repo} ..." |
| 24 | 32 | git push ${repo} | ... | ... |