some auto-detect of wallet commands

This commit is contained in:
Rob Walker 2018-07-02 11:58:01 -07:00 committed by Greg Fitzgerald
parent cfc3bd0696
commit 6ee45d282e
1 changed files with 7 additions and 2 deletions

View File

@ -8,8 +8,13 @@ here=$(dirname "$0")
source "$here"/common.sh
SOLANA_CONFIG_DIR=config-client
leader=${1:-${here}/..} # Default to local solana repo
shift
# if $1 isn't host:path or some local path
if [[ ${1%:} != "$1" || -d $1 ]]; then
leader=$1 # interpret
shift
else
leader=$here/.. # Default to local solana repo
fi
rsync_leader_url=$(rsync_url "$leader")