From 1ac71e150a3cb4ae7f8350bf53c105b70202e4c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Molinero=20Fern=C3=A1ndez?= Date: Wed, 21 Oct 2020 23:25:18 +0200 Subject: [PATCH] Prefer "command -v" over "which" --- BSDmakefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/BSDmakefile b/BSDmakefile index 749a7a2..fc183ec 100755 --- a/BSDmakefile +++ b/BSDmakefile @@ -6,10 +6,11 @@ SHELL := /bin/sh FLAGS := ${.MAKEFLAGS:C/\-J ([0-9]+,?)+//W} all: .DEFAULT + .DEFAULT: - @which gmake >/dev/null 2>&1 || \ - (printf '%s\n' \ + @command -v gmake >/dev/null 2>&1 || \ + { printf '%s\n' \ "GMake is required to build hBlock." \ - "Install it and try again." \ - && exit 1) + "Install it and try again." >&2 \ + && exit 1; } @gmake ${.FLAGS} ${.TARGETS}