This is an automated email from the ASF dual-hosted git repository. liling pushed a commit to branch lilien1010-patch-1 in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git
commit 346141a9e87ff3c9f40de029e7c39cd5096c0c04 Author: Lien <lil...@apache.org> AuthorDate: Thu Jul 30 12:20:39 2020 +0800 feature: support run in mac system --- compose/gen-config-yaml.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/compose/gen-config-yaml.sh b/compose/gen-config-yaml.sh index 0b682c5..794b63b 100644 --- a/compose/gen-config-yaml.sh +++ b/compose/gen-config-yaml.sh @@ -2,10 +2,18 @@ export etcd_url='http://192.17.5.10:2379' +unamestr=`uname` + wget https://raw.githubusercontent.com/apache/incubator-apisix/master/conf/config.yaml -sed -i -e ':a' -e 'N' -e '$!ba' -e "s/allow_admin[a-z: #\/._]*\n\( *- [0-9a-zA-Z: #\/._',]*\n*\)*//g" config.yaml +if [[ "$unamestr" == 'Darwin' ]]; then + sed -i '' -e ':a' -e 'N' -e '$!ba' -e "s/allow_admin[a-z: #\/._]*\n\( *- [0-9a-zA-Z: #\/._',]*\n*\)*//g" config.yaml + sed -i '' -e "s%http://[0-9.]*:2379%`echo $etcd_url`%g" config.yaml +else + sed -i -e ':a' -e 'N' -e '$!ba' -e "s/allow_admin[a-z: #\/._]*\n\( *- [0-9a-zA-Z: #\/._',]*\n*\)*//g" config.yaml + sed -i -e "s%http://[0-9.]*:2379%`echo $etcd_url`%g" config.yaml +fi + -sed -i -e "s%http://[0-9.]*:2379%`echo $etcd_url`%g" config.yaml mv config.yaml ./apisix_conf/config.yaml