From 1620005e335d3959630c7c19fdaa9417e3b989d7 Mon Sep 17 00:00:00 2001 From: typebrook Date: Tue, 12 May 2020 21:54:42 +0800 Subject: Fix sed compatibility for BSD version --- gist | 4 ++-- 1 file 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() { result=$(cat) # clone repos which are not in the local - sed -n '/^\t/ !p' <<<$result \ + sed -ne '/^\t/ !p' <<<$result \ | xargs -I{} --max-procs 8 git clone "$(_repo_url {})" $folder/{} & # if repo is cloned, do 'git pull' if remote repo has different blob objects - sed -n '/^\t/ p' <<<$result \ + sed -ne '/^\t/ s/\t//p' <<<$result \ | xargs -I{} --max-procs 8 bash -c '_pull_if_needed {}' } } -- cgit v1.2.3-70-g09d2