Use gnused in scripts
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
set -o errexit -o nounset -o pipefail
|
||||
command -v shellcheck >/dev/null && shellcheck "$0"
|
||||
|
||||
gnused="$(command -v gsed || echo sed)"
|
||||
|
||||
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
|
||||
# shellcheck source=./env
|
||||
# shellcheck disable=SC1091
|
||||
@@ -47,7 +49,7 @@ function inline_jq() {
|
||||
inline_jq "template/.wasmd/config/genesis.json" -S
|
||||
|
||||
# Custom settings in config.toml
|
||||
sed -i "" \
|
||||
"$gnused" -i \
|
||||
-e 's/^cors_allowed_origins =.*$/cors_allowed_origins = ["*"]/' \
|
||||
-e 's/^timeout_propose =.*$/timeout_propose = "300ms"/' \
|
||||
-e 's/^timeout_propose_delta =.*$/timeout_propose_delta = "100ms"/' \
|
||||
@@ -59,7 +61,7 @@ function inline_jq() {
|
||||
"template/.wasmd/config/config.toml"
|
||||
|
||||
# Custom settings app.toml
|
||||
sed -i "" \
|
||||
"$gnused" -i \
|
||||
-e 's/^enable =.*$/enable = true/' \
|
||||
-e 's/^enabled-unsafe-cors =.*$/enabled-unsafe-cors = true/' \
|
||||
"template/.wasmd/config/app.toml"
|
||||
|
||||
Reference in New Issue
Block a user