You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by li...@apache.org on 2020/07/30 04:20:49 UTC

[incubator-apisix-dashboard] branch lilien1010-patch-1 created (now 346141a)

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

liling pushed a change to branch lilien1010-patch-1
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git.


      at 346141a  feature: support run in mac system

This branch includes the following new commits:

     new 346141a  feature: support run in mac system

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-apisix-dashboard] 01/01: feature: support run in mac system

Posted by li...@apache.org.
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 <li...@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