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
commit87d92141276209a19d5ff7766a2582cd314c44fa (patch)
tree332e50a59bfc84f079be4e90a795780da27c4935 /bin
parent441ed45302de4ce57b5452b83a747465fe0237fd (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