2018-06-18 15:23:56 -07:00
|
|
|
#!/bin/bash
|
2018-06-24 10:10:55 -07:00
|
|
|
#
|
2018-06-26 16:46:17 -07:00
|
|
|
# usage: $0 <rsync network path to solana repo on leader machine> <number of nodes in the network>"
|
2018-06-24 10:10:55 -07:00
|
|
|
#
|
2018-05-27 18:19:07 -07:00
|
|
|
|
2018-06-24 10:10:55 -07:00
|
|
|
here=$(dirname "$0")
|
|
|
|
# shellcheck source=multinode-demo/common.sh
|
|
|
|
source "$here"/common.sh
|
|
|
|
SOLANA_CONFIG_DIR=config-client-demo
|
2018-05-27 18:19:07 -07:00
|
|
|
|
2018-06-24 10:10:55 -07:00
|
|
|
leader=${1:-${here}/..} # Default to local solana repo
|
|
|
|
count=${2:-1}
|
2018-05-27 18:19:07 -07:00
|
|
|
|
2018-06-26 16:46:17 -07:00
|
|
|
rsync_leader_url=$(rsync_url "$leader")
|
|
|
|
|
2018-06-24 10:10:55 -07:00
|
|
|
set -ex
|
|
|
|
mkdir -p $SOLANA_CONFIG_DIR
|
2018-06-26 16:46:17 -07:00
|
|
|
rsync -vPz "$rsync_leader_url"/config/leader.json $SOLANA_CONFIG_DIR/
|
2018-06-27 12:53:01 -07:00
|
|
|
rsync -vPz "$rsync_leader_url"/config/mint.json $SOLANA_CONFIG_DIR/
|
2018-06-14 17:11:55 -07:00
|
|
|
|
2018-06-24 10:10:55 -07:00
|
|
|
# shellcheck disable=SC2086 # $solana_client_demo should not be quoted
|
|
|
|
exec $solana_client_demo \
|
2018-06-29 14:12:26 -07:00
|
|
|
-n "$count" -l $SOLANA_CONFIG_DIR/leader.json \
|
2018-06-27 12:53:01 -07:00
|
|
|
< $SOLANA_CONFIG_DIR/mint.json
|