Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s/local/declare/g #468

Merged
merged 1 commit into from
Jun 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions multinode-demo/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@

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

elif [[ -n "$USE_SNAP" ]]; then # Use the Linux Snap binaries
solana_program() {
local program="$1"
declare program="$1"
printf "solana.%s" "$program"
}
elif [[ -n "$USE_INSTALL" ]]; then # Assume |cargo install| was run
solana_program() {
local program="$1"
declare program="$1"
printf "solana-%s" "$program"
}
# CUDA was/wasn't selected at build time, can't affect CUDA state here
unset SOLANA_CUDA
else
solana_program() {
local program="$1"
local features=""
declare program="$1"
declare features=""
if [[ "$program" =~ ^(.*)-cuda$ ]]; then
program=${BASH_REMATCH[1]}
features="--features=cuda,erasure"
Expand All @@ -49,7 +49,7 @@ export RUST_BACKTRACE=1
SOLANA_CONFIG_DIR=${SNAP_DATA:-$PWD}/config

rsync_url() { # adds the 'rsync://` prefix to URLs that need it
local url="$1"
declare url="$1"

if [[ "$url" =~ ^.*:.*$ ]]; then
# assume remote-shell transport when colon is present, use $url unmodified
Expand Down