From 528fb13458b6dbf21bf7910951749f68fdbfe3da Mon Sep 17 00:00:00 2001 From: 4coffeeihadbreakfast Date: Fri, 22 Mar 2024 21:16:48 -0700 Subject: [PATCH] Mac M1 ksh update --- README.md | 8 ++++++++ cli/ark-cli.sh | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 224ff60..d6f8868 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,14 @@ ark select chain stargaze # reads juno.env file echo $WALLET_MINTER # test correct wallet is shown as defined in env file ``` +### NOTE: +if using Mac OS X version after Catalina (re: Zsh replaced Bash as macOS's default terminal shell in macOS Catalina) +switch to bash before setting up/sourcing CLI. +``` +/bin/bash +``` + + ## Create a collection ```sh diff --git a/cli/ark-cli.sh b/cli/ark-cli.sh index f0ae887..9b28d37 100755 --- a/cli/ark-cli.sh +++ b/cli/ark-cli.sh @@ -43,6 +43,8 @@ source "$ARK_CLI_DIR"/chain-query-height.sh source "$ARK_CLI_DIR"/nft-query-snapshot.sh source "$ARK_CLI_DIR"/wasm_tx_store.sh +ARCH="$(uname -m)" + function ark() { ARGS=$@ # backup args @@ -165,7 +167,11 @@ function ark() { fi ;; select) - CHAIN=${1,,} # lowercase + if [[ ARCH="arm64" ]]; then + CHAIN=${1:l} # lowercase + else + CHAIN=${1,,} # lowercase + fi ARK_ENV_FILE="$ARK_ENV_DIR/"${CHAIN}.env echo "reading $ARK_ENV_FILE" >&2 source "$ARK_ENV_FILE" @@ -351,4 +357,4 @@ fi echo "- max calls (like tx queries) until succcesful response set to: MAX_CALL_LIMIT=$MAX_CALL_LIMIT" -export -f ark \ No newline at end of file +export -f ark