commit: f8b3029be34143dbd19737aa9bad2948bf0b88c7
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Tue Jun 4 02:35:09 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 12 07:06:42 2024 +0000
URL:
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=f8b3029b
Clean up the jq detection procedure in eqatag()
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
functions.sh | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/functions.sh b/functions.sh
index 6b4c3fa..f5a59fc 100644
--- a/functions.sh
+++ b/functions.sh
@@ -194,14 +194,9 @@ eqatag()
0)
return 1
;;
- 1)
- ;;
- *)
- if command -v jq >/dev/null; then
- genfun_has_jq=1
- else
+ '')
+ if ! hash jq 2>/dev/null; [ "$(( genfun_has_jq = $? ))"
-eq 0 ]; then
warn "eqatag: this function requires that jq be
installed"
- genfun_has_jq=0
return 1
fi
esac