Skip to content

Commit

Permalink
feat: check if make is available
Browse files Browse the repository at this point in the history
  • Loading branch information
sripwoud committed Jul 2, 2024
1 parent ec9ce9f commit a3d20b4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@
set -eu

ORANGE="\033[33m"
RED="\033[31m"
RESET="\033[0m"

log() {
printf "%b\n" "$1"
}

is_bin_locally_available() {
is_make_available() {
if ! command -v make >/dev/null; then
log "${RED}error: make is not available.$RESET\nPlease install ${ORANGE}make$RESET for your OS and run this script again."
return 1
fi
}

is_crate_bin_locally_available() {
crate="$1"
[ -x ".cargo/bin/$crate" ]
}
Expand Down

0 comments on commit a3d20b4

Please sign in to comment.