Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Snap client-demo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jul 14, 2018
1 parent 4240edf commit 490d787
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion multinode-demo/client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ here=$(dirname "$0")
# shellcheck source=multinode-demo/common.sh
source "$here"/common.sh

leader=${1:-${here}/..} # Default to local solana repo
leader=$1
if [[ -z $leader ]]; then
if [[ -d "$SNAP" ]]; then
leader=testnet.solana.com # Default to testnet when running as a Snap
else
leader=$here/.. # Default to local solana repo
fi
fi
count=${2:-1}

rsync_leader_url=$(rsync_url "$leader")
Expand Down
7 changes: 7 additions & 0 deletions multinode-demo/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ if [[ -d "$SNAP" ]]; then # Running inside a Linux Snap?
else
printf "%s/command-%s.wrapper" "$SNAP" "$program"
fi
if [[ "$program" = client-demo ]]; then
# TODO: Merge client.sh functionality into solana-client-demo proper and
# remove this special case
printf "%s/bin/solana-%s" "$SNAP" "$program"
else
printf "%s/command-%s.wrapper" "$SNAP" "$program"
fi
}
rsync="$SNAP"/bin/rsync
SOLANA_METRICS_CONFIG="$(snapctl get metrics-config)"
Expand Down

0 comments on commit 490d787

Please sign in to comment.