aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-05-12 21:54:42 +0800
committertypebrook <typebrook@gmail.com>2020-05-12 21:54:42 +0800
commit1620005e335d3959630c7c19fdaa9417e3b989d7 (patch)
tree45b5713321f67ca8331f89d9b4facd7e25b45022
parentbbd80485fef5c214288c6e591ccbc368d04b9726 (diff)
Fix sed compatibility for BSD version
-rwxr-xr-xgist4
1 files changed, 2 insertions, 2 deletions
diff --git a/gist b/gist
index fd9fd30..b1f82a2 100755
--- a/gist
+++ b/gist
@@ -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}