summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorSalvatore Bonaccorso <carnil@debian.org>2021-08-21 17:45:29 +0200
committerSalvatore Bonaccorso <carnil@debian.org>2021-08-21 17:45:29 +0200
commit6fd65a3b2cc86beaa0ab3e806e366ee2a3f418c8 (patch)
tree3f2b224dac6b4005eabc340147ecabe73a23eb4c /bin
parent09fb9f68b81532342c845d793aa938c02aca8d49 (diff)
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 <carnil@debian.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gen-DSA4
1 files changed, 2 insertions, 2 deletions
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)

© 2014-2024 Faster IT GmbH | imprint | privacy policy