[Git][security-tracker-team/security-tracker][master] gen-D[LS]A: Replace use of which with command -v
Salvatore Bonaccorso (@carnil)
carnil at debian.org
Sat Aug 21 16:49:40 BST 2021
Salvatore Bonaccorso pushed to branch master at Debian Security Tracker / security-tracker
Commits:
6fd65a3b by Salvatore Bonaccorso at 2021-08-21T17:45:29+02:00
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 at debian.org>
- - - - -
1 changed file:
- bin/gen-DSA
Changes:
=====================================
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)
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/-/commit/6fd65a3b2cc86beaa0ab3e806e366ee2a3f418c8
--
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/-/commit/6fd65a3b2cc86beaa0ab3e806e366ee2a3f418c8
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-security-tracker-commits/attachments/20210821/ad38068a/attachment-0001.htm>
More information about the debian-security-tracker-commits
mailing list