From c78486240eedd69da783809f3bbdac5a7ada8b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Sun, 28 Jun 2020 05:05:52 +0200 Subject: [PATCH] shared_testnet: support newlines in options --- docker/shared_testnet/entry_point.sh | 4 ++-- docker/shared_testnet/validator_keys.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/shared_testnet/entry_point.sh b/docker/shared_testnet/entry_point.sh index 60c83696c..293464f42 100755 --- a/docker/shared_testnet/entry_point.sh +++ b/docker/shared_testnet/entry_point.sh @@ -63,8 +63,8 @@ while true; do esac done -# some old getopt (from util-linux 2.31.1) leaves a '--' option in $@ -if [[ "$1" == "--" ]]; then +# docker-compose.yml inserts newlines in our options +if [[ "$(echo $1 | tr -d '[:space:]')" == "--" ]]; then shift fi diff --git a/docker/shared_testnet/validator_keys.sh b/docker/shared_testnet/validator_keys.sh index 5f1637da1..be18f8756 100755 --- a/docker/shared_testnet/validator_keys.sh +++ b/docker/shared_testnet/validator_keys.sh @@ -9,6 +9,8 @@ cd "$(dirname "${BASH_SOURCE[0]}")/../.." [[ -z "$1" ]] && { echo "Usage: $(basename $0) YOUR_ETH1_PRIVATE_GOERLI_KEY"; exit 1; } +# TODO: make "witti" a parameter + echo -ne "About to delete \"build/data/shared_witti_0\".\nMake a backup, if you need to, then press Enter. >" read TMP make clean-witti