Fixup arg processing

This commit is contained in:
Michael Vines 2018-07-23 16:10:33 -07:00
parent 48b5344586
commit 7d68b6edc8
1 changed files with 7 additions and 5 deletions

View File

@ -13,8 +13,9 @@ here=$(dirname "$0")
source "$here"/common.sh source "$here"/common.sh
leader=$1 leader=$1
shift if [[ -n $leader ]]; then
if [[ -z $leader ]]; then shift
else
if [[ -d "$SNAP" ]]; then if [[ -d "$SNAP" ]]; then
leader=testnet.solana.com # Default to testnet when running as a Snap leader=testnet.solana.com # Default to testnet when running as a Snap
else else
@ -23,9 +24,10 @@ if [[ -z $leader ]]; then
fi fi
count=$1 count=$1
shift if [[ -n $count ]]; then
if [[ -z $count ]]; then shift
count=-1 else
count=1
fi fi
loop= loop=