|
@@ -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 \
|