Automatically add rsync:// prefix to URLs that need it

This commit is contained in:
Michael Vines
2018-06-26 16:46:17 -07:00
committed by Grimes
parent 5b5df49e6c
commit 5cd1fb486f
4 changed files with 57 additions and 14 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
#
# usage: $0 <network path to solana repo on leader machine> <number of nodes in the network>"
# usage: $0 <rsync network path to solana repo on leader machine> <number of nodes in the network>"
#
here=$(dirname "$0")
@ -11,10 +11,12 @@ SOLANA_CONFIG_DIR=config-client-demo
leader=${1:-${here}/..} # Default to local solana repo
count=${2:-1}
rsync_leader_url=$(rsync_url "$leader")
set -ex
mkdir -p $SOLANA_CONFIG_DIR
rsync -vz "$leader"/config/leader.json $SOLANA_CONFIG_DIR/
rsync -vz "$leader"/config/mint-demo.json $SOLANA_CONFIG_DIR/
rsync -vPz "$rsync_leader_url"/config/leader.json $SOLANA_CONFIG_DIR/
rsync -vPz "$rsync_leader_url"/config/mint-demo.json $SOLANA_CONFIG_DIR/
# shellcheck disable=SC2086 # $solana_client_demo should not be quoted
exec $solana_client_demo \