From 6fd65a3b2cc86beaa0ab3e806e366ee2a3f418c8 Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Sat, 21 Aug 2021 17:45:29 +0200 Subject: gen-D[LS]A: Replace use of which with command -v As debianutils 5.3-1 deprecates the use of which and will be removed in a future update, switch to the command shell builtin. Signed-off-by: Salvatore Bonaccorso --- bin/gen-DSA | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/gen-DSA b/bin/gen-DSA index dbdfc12245..9d7d55465e 100755 --- a/bin/gen-DSA +++ b/bin/gen-DSA @@ -27,7 +27,7 @@ case "$(basename "$0")" in ;; esac -if ! which jq >/dev/null 2>&1 ; then +if ! command -v jq >/dev/null ; then echo "error: jq is needed to parse distributions, please install it" exit 1 fi @@ -149,7 +149,7 @@ setvar() { sed -i "s=\$$var=$value=g" "$tmpf" } -if which tput >/dev/null; then +if command -v tput >/dev/null; then RED=$(tput setaf 1) YELLOW=$(tput setaf 3) MAGENTA=$(tput setaf 5) -- cgit v1.2.3