s/local/declare/g
This commit is contained in:
parent
5cd1fb486f
commit
faedb88de0
|
@ -5,27 +5,27 @@
|
||||||
|
|
||||||
if [[ -d "$SNAP" ]]; then # Running inside a Linux Snap?
|
if [[ -d "$SNAP" ]]; then # Running inside a Linux Snap?
|
||||||
solana_program() {
|
solana_program() {
|
||||||
local program="$1"
|
declare program="$1"
|
||||||
printf "%s/command-%s.wrapper" "$SNAP" "$program"
|
printf "%s/command-%s.wrapper" "$SNAP" "$program"
|
||||||
}
|
}
|
||||||
SOLANA_CUDA="$(snapctl get enable-cuda)"
|
SOLANA_CUDA="$(snapctl get enable-cuda)"
|
||||||
|
|
||||||
elif [[ -n "$USE_SNAP" ]]; then # Use the Linux Snap binaries
|
elif [[ -n "$USE_SNAP" ]]; then # Use the Linux Snap binaries
|
||||||
solana_program() {
|
solana_program() {
|
||||||
local program="$1"
|
declare program="$1"
|
||||||
printf "solana.%s" "$program"
|
printf "solana.%s" "$program"
|
||||||
}
|
}
|
||||||
elif [[ -n "$USE_INSTALL" ]]; then # Assume |cargo install| was run
|
elif [[ -n "$USE_INSTALL" ]]; then # Assume |cargo install| was run
|
||||||
solana_program() {
|
solana_program() {
|
||||||
local program="$1"
|
declare program="$1"
|
||||||
printf "solana-%s" "$program"
|
printf "solana-%s" "$program"
|
||||||
}
|
}
|
||||||
# CUDA was/wasn't selected at build time, can't affect CUDA state here
|
# CUDA was/wasn't selected at build time, can't affect CUDA state here
|
||||||
unset SOLANA_CUDA
|
unset SOLANA_CUDA
|
||||||
else
|
else
|
||||||
solana_program() {
|
solana_program() {
|
||||||
local program="$1"
|
declare program="$1"
|
||||||
local features=""
|
declare features=""
|
||||||
if [[ "$program" =~ ^(.*)-cuda$ ]]; then
|
if [[ "$program" =~ ^(.*)-cuda$ ]]; then
|
||||||
program=${BASH_REMATCH[1]}
|
program=${BASH_REMATCH[1]}
|
||||||
features="--features=cuda,erasure"
|
features="--features=cuda,erasure"
|
||||||
|
@ -49,7 +49,7 @@ export RUST_BACKTRACE=1
|
||||||
SOLANA_CONFIG_DIR=${SNAP_DATA:-$PWD}/config
|
SOLANA_CONFIG_DIR=${SNAP_DATA:-$PWD}/config
|
||||||
|
|
||||||
rsync_url() { # adds the 'rsync://` prefix to URLs that need it
|
rsync_url() { # adds the 'rsync://` prefix to URLs that need it
|
||||||
local url="$1"
|
declare url="$1"
|
||||||
|
|
||||||
if [[ "$url" =~ ^.*:.*$ ]]; then
|
if [[ "$url" =~ ^.*:.*$ ]]; then
|
||||||
# assume remote-shell transport when colon is present, use $url unmodified
|
# assume remote-shell transport when colon is present, use $url unmodified
|
||||||
|
|
Loading…
Reference in New Issue