Browse Source

Replace usage of which(1)

Christoph Biedl 8 months ago
parent
commit
b61819f56d

+ 25 - 0
debian/patches/for-upstream/2021-12-01.replace-usage-of-which.patch

@@ -0,0 +1,25 @@
+Subject: Replace usage of which(1)
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Date: 2021-12-01
+Forwarded: https://github.com/latchset/jose/issues/108
+
+--- a/tests/jose-jwe-enc
++++ b/tests/jose-jwe-enc
+@@ -15,7 +15,7 @@
+ jwe=$tmpdir/jwe
+ 
+ jqopt() {
+-    if ! which jq >/dev/null 2>&1; then
++    if ! command -v jq >/dev/null 2>&1; then
+         echo "$3"
+     else
+         jq -r "if $2 | type | . = \"string\" then $2 else error(\"\") end" < $1
+@@ -23,7 +23,7 @@
+ }
+ 
+ jqbopt() {
+-    if ! which jq >/dev/null 2>&1; then
++    if ! command -v jq >/dev/null 2>&1; then
+         echo "$4"
+     else
+         jq -r "if $2 | type | . = \"string\" then $2 else error(\"\") end" < $1 \

+ 1 - 0
debian/patches/series

@@ -2,6 +2,7 @@
 # cherry-picked commits. Keep in upstream's chronological order
 
 # patches for upstream
+for-upstream/2021-12-01.replace-usage-of-which.patch
 
 # patches for Debian
 debian/2021-11-29.use-asciidoctor-to-build-manpages.patch