This is an automated email from the ASF dual-hosted git repository.

tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new c2232ee  fix-sed-command-in-OSX (#3318)
c2232ee is described below

commit c2232eef190b3daf6e0b6adcb58ce49c79b82fa3
Author: Lien <[email protected]>
AuthorDate: Mon Jan 18 13:31:18 2021 +0800

    fix-sed-command-in-OSX (#3318)
---
 benchmark/run.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/benchmark/run.sh b/benchmark/run.sh
index f3268f6..7d1f06a 100755
--- a/benchmark/run.sh
+++ b/benchmark/run.sh
@@ -134,7 +134,12 @@ echo -e "\n\nfake empty apisix server: $worker_cnt worker"
 
 sleep 1
 
-sed  -i "s/worker_processes [0-9]*/worker_processes $worker_cnt/g" 
benchmark/fake-apisix/conf/nginx.conf
+if [[ "$(uname)" == "Darwin" ]]; then
+    sed  -i "" "s/worker_processes [0-9]*/worker_processes $worker_cnt/g" 
benchmark/fake-apisix/conf/nginx.conf
+else
+    sed  -i "s/worker_processes [0-9]*/worker_processes $worker_cnt/g" 
benchmark/fake-apisix/conf/nginx.conf
+fi
+
 sudo openresty -p $PWD/benchmark/fake-apisix || exit 1
 
 sleep 1

Reply via email to