scripts: rearrange run_server to work with old bash
@@ -68,8 +68,14 @@ if [[ -n ${EXAMPLE+x} ]]; then
esac
fi
+declare -a ADDITIONAL_ARGS
+ADDITIONAL_ARGS+=(
+ "--grpc-tls-private-key=${SCRIPTS_DIR}/../examples/certs/local/local.key"
+ "--grpc-tls-certificate=${SCRIPTS_DIR}/../examples/certs/local/local.pem"
+ "--root-tls-certificate=${SCRIPTS_DIR}/../examples/certs/local/ca.pem"
+)
if [[ -n "${OIDC_CLIENT+x}" ]]; then
- readonly ADDITIONAL_ARGS=("--oidc-client=${OIDC_CLIENT}")
+ readonly ADDITIONAL_ARGS+=("--oidc-client=${OIDC_CLIENT}")
fi
if [[ -z "${APPLICATION+z}" ]]; then
@@ -83,7 +89,4 @@ fi
# `exec` is necessary for the `run_example` script to be able to get a PID of a background server.
exec cargo run "${cargo_build_flags[@]}" --package=oak_loader -- \
--application="${APPLICATION}" \
- --grpc-tls-private-key="${SCRIPTS_DIR}/../examples/certs/local/local.key" \
- --grpc-tls-certificate="${SCRIPTS_DIR}/../examples/certs/local/local.pem" \
- --root-tls-certificate="${SCRIPTS_DIR}/../examples/certs/local/ca.pem" \
"${ADDITIONAL_ARGS[@]}"
