From 98bedc97a8370745348c8130d49600ab53aa2f9d Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Sun, 29 Dec 2019 21:12:54 -0400 Subject: [PATCH] Fix for macos's decrepit old bash 3.x --- lokinet-bootstrap | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lokinet-bootstrap b/lokinet-bootstrap index b1cf445c8..683173b69 100755 --- a/lokinet-bootstrap +++ b/lokinet-bootstrap @@ -9,23 +9,18 @@ NC='\033[0m' # No Color set -e helpme= -declare -A default_url -default_url=( - [lokinet]="https://seed.lokinet.org/lokinet.signed" - [mainnet]="https://seed.lokinet.org/lokinet.signed" - [testnet]="https://seed.lokinet.org/testnet.signed" -) +default_mainnet=https://seed.lokinet.org/lokinet.signed +default_testnet=https://seed.lokinet.org/testnet.signed default_dest="$HOME/.lokinet/bootstrap.signed" if [ "$#" -gt 2 ]; then helpme=y fi -if [ -z "$1" ] -then - url="${default_url[mainnet]}" -elif [ -n "${default_url[$1]}" ]; then - url="${default_url[$1]}" +if [ -z "$1" ] || [ "$1" == "mainnet" ] || [ "$1" == "lokinet" ]; then + url="${default_mainnet}" +elif [ "$1" == "testnet" ]; then + url="${default_testnet}" elif [[ "$1" = -* ]]; then helpme=y else