From 7f4c042729b6596e3a472cf8b7e86eca0b7dbc8e Mon Sep 17 00:00:00 2001 From: Yuki Furuyama Date: Mon, 5 Aug 2019 00:29:55 +0900 Subject: [PATCH] Use awk to be worked on macOS --- docs/deploy/gke/gke-self-managed.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/deploy/gke/gke-self-managed.sh b/docs/deploy/gke/gke-self-managed.sh index 5b90a04cc6..9d2c9d369c 100755 --- a/docs/deploy/gke/gke-self-managed.sh +++ b/docs/deploy/gke/gke-self-managed.sh @@ -392,8 +392,8 @@ while true; do done # Recreates the deployment and service for the default backend. -# Note: We do sed on a copy so that the original file stays clean for future runs. -sed "/name: http/a \ \ \ \ nodePort: ${NODE_PORT}" ../resources/default-http-backend.yaml > ../resources/default-http-backend.yaml.gen +# Note: We do awk on a copy so that the original file stays clean for future runs. +awk "1;/name: http/{ print \" nodePort: ${NODE_PORT}\" }" ../resources/default-http-backend.yaml > ../resources/default-http-backend.yaml.gen run_maybe_dry_kubectl kubectl create -f ../resources/default-http-backend.yaml.gen if [[ $? -eq 1 ]]; then