Skip to content

Commit

Permalink
replaced ./cargo with cargo in build docs (solana-labs#29375)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill lykov authored and gnapoli23 committed Jan 10, 2023
1 parent 18fe441 commit f70d71f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/build-cli-usage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
set -e

cd "$(dirname "$0")"
cargo=../cargo

# shellcheck source=ci/rust-version.sh
source ../ci/rust-version.sh stable

: "${rust_stable:=}" # Pacify shellcheck

# pre-build with output enabled to appease Travis CI's hang check
"$cargo" build -p solana-cli
cargo build -p solana-cli

usage=$("$cargo" stable -q run -p solana-cli -- -C ~/.foo --help | sed -e 's|'"$HOME"'|~|g' -e 's/[[:space:]]\+$//')
usage=$(cargo -q run -p solana-cli -- -C ~/.foo --help | sed -e 's|'"$HOME"'|~|g' -e 's/[[:space:]]\+$//')

out=${1:-src/cli/usage.md}

Expand Down Expand Up @@ -40,6 +39,6 @@ in_subcommands=0
while read -r subcommand rest; do
[[ $subcommand == "SUBCOMMANDS:" ]] && in_subcommands=1 && continue
if ((in_subcommands)); then
section "$("$cargo" stable -q run -p solana-cli -- help "$subcommand" | sed -e 's|'"$HOME"'|~|g' -e 's/[[:space:]]\+$//')" "####" >> "$out"
section "$(cargo -q run -p solana-cli -- help "$subcommand" | sed -e 's|'"$HOME"'|~|g' -e 's/[[:space:]]\+$//')" "####" >> "$out"
fi
done <<<"$usage">>"$out"

0 comments on commit f70d71f

Please sign in to comment.