Skip to content

Commit

Permalink
Correct locate rsync when running as a Snap
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jul 2, 2018
1 parent 2cbfe41 commit feb1669
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions multinode-demo/client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ rsync_leader_url=$(rsync_url "$leader")

set -ex
mkdir -p $SOLANA_CONFIG_DIR
rsync -vPz "$rsync_leader_url"/config/leader.json $SOLANA_CONFIG_DIR/
rsync -vPz "$rsync_leader_url"/config-private/mint.json $SOLANA_CONFIG_DIR/
$rsync -vPz "$rsync_leader_url"/config/leader.json $SOLANA_CONFIG_DIR/
$rsync -vPz "$rsync_leader_url"/config-private/mint.json $SOLANA_CONFIG_DIR/

# shellcheck disable=SC2086 # $solana_client_demo should not be quoted
exec $solana_client_demo \
Expand Down
2 changes: 2 additions & 0 deletions multinode-demo/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
# Disable complaints about unused variables in this file:
# shellcheck disable=2034

rsync=rsync
if [[ -d "$SNAP" ]]; then # Running inside a Linux Snap?
solana_program() {
declare program="$1"
printf "%s/command-%s.wrapper" "$SNAP" "$program"
}
rsync="$SNAP"/bin/rsync
SOLANA_CUDA="$(snapctl get enable-cuda)"

elif [[ -n "$USE_SNAP" ]]; then # Use the Linux Snap binaries
Expand Down
4 changes: 2 additions & 2 deletions multinode-demo/drone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ fi
rsync_leader_url=$(rsync_url "$leader")
set -ex
mkdir -p $SOLANA_CONFIG_DIR
rsync -vPz "$rsync_leader_url"/config/leader.json $SOLANA_CONFIG_DIR/
rsync -vPz "$rsync_leader_url"/config-private/mint.json $SOLANA_CONFIG_DIR/
$rsync -vPz "$rsync_leader_url"/config/leader.json $SOLANA_CONFIG_DIR/
$rsync -vPz "$rsync_leader_url"/config-private/mint.json $SOLANA_CONFIG_DIR/

# shellcheck disable=SC2086 # $solana_drone should not be quoted
exec $solana_drone \
Expand Down
2 changes: 1 addition & 1 deletion multinode-demo/validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ rsync_leader_url=$(rsync_url "$leader")
set -ex
SOLANA_LEADER_CONFIG_DIR="$SOLANA_CONFIG_DIR"/leader-config
rm -rf "$SOLANA_LEADER_CONFIG_DIR"
rsync -vPrz "$rsync_leader_url"/config/ "$SOLANA_LEADER_CONFIG_DIR"
$rsync -vPrz "$rsync_leader_url"/config/ "$SOLANA_LEADER_CONFIG_DIR"
ls -lh "$SOLANA_LEADER_CONFIG_DIR"

# shellcheck disable=SC2086 # $program should not be quoted
Expand Down
2 changes: 1 addition & 1 deletion multinode-demo/wallet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rsync_leader_url=$(rsync_url "$leader")
set -e
mkdir -p $SOLANA_CONFIG_DIR
if [[ ! -r $SOLANA_CONFIG_DIR/leader.json ]]; then
rsync -vPz "$rsync_leader_url"/config/leader.json $SOLANA_CONFIG_DIR/
$rsync -vPz "$rsync_leader_url"/config/leader.json $SOLANA_CONFIG_DIR/
fi

client_json=$SOLANA_CONFIG_DIR/client.json
Expand Down

0 comments on commit feb1669

Please sign in to comment.