diff options
| -rwxr-xr-x | gist | 7 |
1 files changed, 4 insertions, 3 deletions
| @@ -475,10 +475,9 @@ _pull_if_needed() { | |||
| 475 | cd "$repo" \ | 475 | cd "$repo" \ |
| 476 | && [[ $blob_code_local != "$blob_code" ]] \ | 476 | && [[ $blob_code_local != "$blob_code" ]] \ |
| 477 | && [[ $(git rev-parse origin/master) == $(git rev-parse master) ]] \ | 477 | && [[ $(git rev-parse origin/master) == $(git rev-parse master) ]] \ |
| 478 | && git pull | 478 | && git pull & |
| 479 | done | 479 | done |
| 480 | } | 480 | } |
| 481 | export -f _pull_if_needed | ||
| 482 | 481 | ||
| 483 | # Update local git repos | 482 | # Update local git repos |
| 484 | _sync_repos() { | 483 | _sync_repos() { |
| @@ -493,7 +492,9 @@ _sync_repos() { | |||
| 493 | 492 | ||
| 494 | # if repo is cloned, do 'git pull' if remote repo has different blob objects | 493 | # if repo is cloned, do 'git pull' if remote repo has different blob objects |
| 495 | sed -ne '/^\t/ s/\t//p' <<<$result \ | 494 | sed -ne '/^\t/ s/\t//p' <<<$result \ |
| 496 | | xargs -I{} --max-procs 8 bash -c '_pull_if_needed {}' | 495 | | while read GIST_ID; do |
| 496 | _pull_if_needed $GIST_ID | ||
| 497 | done | ||
| 497 | } | 498 | } |
| 498 | } | 499 | } |
| 499 | 500 | ||