clean up demo bash scripts
* allow other level of RUST logging * avoid "echo" in favor of printf (builtin) * single quotes for literals, double quotes for variables
This commit is contained in:
parent
9b202c6e1e
commit
d30670e92e
|
@ -1,20 +1,18 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "usage: $0 [network path to solana repo on leader machine] [number of nodes in the network if greater then 1]"
|
||||
if [[ -z $1 ]]; then
|
||||
printf 'usage: %s [network path to solana repo on leader machine] [number of nodes in the network if greater then 1]' "$0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LEADER="$1"
|
||||
COUNT="$2"
|
||||
if [[ -z "$2" ]]; then
|
||||
COUNT=1
|
||||
fi
|
||||
LEADER=$1
|
||||
COUNT=${2:-1}
|
||||
|
||||
set -x
|
||||
export RUST_LOG=solana=info
|
||||
rsync -v -e ssh "$LEADER/leader.json" .
|
||||
rsync -v -e ssh "$LEADER/mint-demo.json" .
|
||||
rsync -v -e ssh "$LEADER"/{leader.json,mint-demo.json} .
|
||||
|
||||
# if RUST_LOG is unset, default to info
|
||||
export RUST_LOG=${RUST_LOG:-solana=info}
|
||||
|
||||
cargo run --release --bin solana-client-demo -- \
|
||||
-n $COUNT -l leader.json -d < mint-demo.json 2>&1 | tee client.log
|
||||
-n "$COUNT" -l leader.json -d < mint-demo.json 2>&1 | tee client.log
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/bin/bash
|
||||
export RUST_LOG=solana=info
|
||||
|
||||
# if RUST_LOG is unset, default to info
|
||||
export RUST_LOG=${RUST_LOG:-solana=info}
|
||||
|
||||
sudo sysctl -w net.core.rmem_max=26214400
|
||||
cargo run --release --bin solana-fullnode -- -l leader.json < genesis.log
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
#!/bin/bash -e
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "usage: $0 [network path to solana repo on leader machine]"
|
||||
if [[ -z $1 ]]; then
|
||||
printf 'usage: %s [network path to solana repo on leader machine]\n' "$0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LEADER="$1"
|
||||
LEADER=$1
|
||||
|
||||
set -x
|
||||
|
||||
rsync -v -e ssh "$LEADER/mint-demo.json" .
|
||||
rsync -v -e ssh "$LEADER/leader.json" .
|
||||
rsync -v -e ssh "$LEADER/genesis.log" .
|
||||
|
||||
export RUST_LOG=solana=info
|
||||
rsync -v -e ssh "$LEADER"/{mint-demo.json,leader.json,genesis.log} . || exit $?
|
||||
|
||||
sudo sysctl -w net.core.rmem_max=26214400
|
||||
|
||||
# if RUST_LOG is unset, default to info
|
||||
export RUST_LOG=${RUST_LOG:-solana=info}
|
||||
|
||||
cargo run --release --bin solana-fullnode -- \
|
||||
-l validator.json -v leader.json < genesis.log
|
||||
|
|
Loading…
Reference in New Issue