Fixup arg processing
This commit is contained in:
parent
48b5344586
commit
7d68b6edc8
|
@ -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=
|
||||||
|
|
Loading…
Reference in New Issue