fix(bin/emqx): make sed replace \n work in macos 10
This commit is contained in:
parent
7ee1d6d54d
commit
5d8539c01a
5
bin/emqx
5
bin/emqx
|
@ -356,7 +356,10 @@ generate_config() {
|
|||
## transform a single line args list like '-config ... -args_file ... -vm_args ...' to lines and get path for each file respectively
|
||||
## NOTE: the -args_file and -vm_args are the same file passed twice because args_file is used by beam, but not possible to get at runtime
|
||||
## by calling init:get_arguments/0
|
||||
lines="$(echo "$CUTTLEFISH_OUTPUT" | tail -1 | sed 's/-config/\nconfig=/g' | sed 's/-args_file/\nargs_file=/g' | sed 's/-vm_args/\nvm_args=/g')"
|
||||
lines="$(echo "$CUTTLEFISH_OUTPUT" | tail -1 \
|
||||
| sed -e $'s/-config/\\\nconfig=/g' \
|
||||
| sed -e $'s/-args_file/\\\nargs_file=/g' \
|
||||
| sed -e $'s/-vm_args/\\\nvm_args=/g')"
|
||||
CONFIG_FILE="$(trim "$(echo -e "$lines" | grep 'config=' | sed 's/config=//g')")"
|
||||
CUTTLE_GEN_ARG_FILE="$(trim "$(echo -e "$lines" | grep 'vm_args=' | sed 's/vm_args=//g')")"
|
||||
|
||||
|
|
Loading…
Reference in New Issue