Files
solana/book/build.sh
Rob Walker 586d9ee850 fix some nits (#2034)
rework maybe_cargo_install(), renamed to cargo_install_unless, updated to take a command to attempt
2018-12-08 19:14:19 -08:00

24 lines
326 B
Bash
Executable File

#!/usr/bin/env bash
set -e
cd "$(dirname "$0")"
_() {
echo "--- $*"
"$@"
}
cargo_install_unless() {
declare crate=$1
shift
"$@" > /dev/null 2>&1 || \
_ cargo install "$crate"
}
export PATH=$CARGO_HOME/bin:$PATH
cargo_install_unless mdbook mdbook --help
cargo_install_unless svgbob_cli svgbob --help
_ make