Skip to content

Commit

Permalink
fix-sed-command-in-OSX (apache#3318)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilien1010 authored Jan 18, 2021
1 parent abb7841 commit c2232ee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion benchmark/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c2232ee

Please sign in to comment.