diff options
| author | typebrook <typebrook@gmail.com> | 2020-05-12 21:54:42 +0800 |
|---|---|---|
| committer | typebrook <typebrook@gmail.com> | 2020-05-12 21:54:42 +0800 |
| commit | 1620005e335d3959630c7c19fdaa9417e3b989d7 (patch) | |
| tree | 45b5713321f67ca8331f89d9b4facd7e25b45022 | |
| parent | bbd80485fef5c214288c6e591ccbc368d04b9726 (diff) | |
Fix sed compatibility for BSD version
| -rwxr-xr-x | gist | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -488,11 +488,11 @@ _sync_repos() { | |||
| 488 | result=$(cat) | 488 | result=$(cat) |
| 489 | 489 | ||
| 490 | # clone repos which are not in the local | 490 | # clone repos which are not in the local |
| 491 | sed -n '/^\t/ !p' <<<$result \ | 491 | sed -ne '/^\t/ !p' <<<$result \ |
| 492 | | xargs -I{} --max-procs 8 git clone "$(_repo_url {})" $folder/{} & | 492 | | xargs -I{} --max-procs 8 git clone "$(_repo_url {})" $folder/{} & |
| 493 | 493 | ||
| 494 | # if repo is cloned, do 'git pull' if remote repo has different blob objects | 494 | # if repo is cloned, do 'git pull' if remote repo has different blob objects |
| 495 | sed -n '/^\t/ p' <<<$result \ | 495 | sed -ne '/^\t/ s/\t//p' <<<$result \ |
| 496 | | xargs -I{} --max-procs 8 bash -c '_pull_if_needed {}' | 496 | | xargs -I{} --max-procs 8 bash -c '_pull_if_needed {}' |
| 497 | } | 497 | } |
| 498 | } | 498 | } |