[PATCH sxmo-utils] Remove gojq proxy
Export this patch
Recent jq version seems fast enough. We drop this proxy, and use jq
directly
Looks good to me! Applied!
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
---
.builds/test.yml | 1 -
scripts/core/sxmo_common.sh | 1 -
scripts/core/sxmo_wm.sh | 2 +-
spec/helper/jq.sh | 7 -------
spec/scripts/core/sxmo_common_spec.sh | 9 ---------
5 files changed, 1 insertion(+), 19 deletions(-)
delete mode 100644 spec/helper/jq.sh
delete mode 100644 spec/scripts/core/sxmo_common_spec.sh
diff --git a/.builds/test.yml b/.builds/test.yml
index a4220bad..c37dc716 100644
--- a/.builds/test.yml
+++ b/.builds/test.yml
@@ -3,7 +3,6 @@ packages:
- shellcheck
- editorconfig-checker
- shellspec
- - gojq
- jq
- icu-dev
sources:
diff --git a/scripts/core/sxmo_common.sh b/scripts/core/sxmo_common.sh
index 1aed3152..270c1f82 100755
--- a/scripts/core/sxmo_common.sh
+++ b/scripts/core/sxmo_common.sh
@@ -15,7 +15,6 @@ command -v shopt > /dev/null && shopt -s expand_aliases
alias dmenu="sxmo_dmenu.sh"
alias bemenu="sxmo_dmenu.sh"
-alias jq="gojq" # better performances
if ! command -v sxmobar > /dev/null; then
sxmobar() {
diff --git a/scripts/core/sxmo_wm.sh b/scripts/core/sxmo_wm.sh
index d50659da..d1e80274 100755
--- a/scripts/core/sxmo_wm.sh
+++ b/scripts/core/sxmo_wm.sh
@@ -73,7 +73,7 @@ swayinputevent() {
# If we dont have any matching input
if ! swaymsg -t get_inputs \
- | gojq -r ".[] | select(.type == \"$TOUCH_POINTER_ID\" )" \
+ | jq -r ".[] | select(.type == \"$TOUCH_POINTER_ID\" )" \
| grep -q .; then
if [ -z "$2" ]; then
diff --git a/spec/helper/jq.sh b/spec/helper/jq.sh
deleted file mode 100644
index 51b4f36d..00000000
--- a/spec/helper/jq.sh
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# include common definitions
-# shellcheck source=scripts/core/sxmo_common.sh
-. sxmo_common.sh
-
-jq -v | cut -d" " -f1
diff --git a/spec/scripts/core/sxmo_common_spec.sh b/spec/scripts/core/sxmo_common_spec.sh
deleted file mode 100644
index 559809f2..00000000
--- a/spec/scripts/core/sxmo_common_spec.sh
@@ -1,9 +0,0 @@
-# This file is to investigate whether sxmo_common.sh is loaded in tests
-
-Describe 'sxmo_common.sh'
- It 'runs all tests with sxmo_common.sh loaded'
- When call sh spec/helper/jq.sh
- The output should equal 'gojq'
- The status should be success
- End
-End
--
2.44.0
sxmo-utils/patches/test.yml: SUCCESS in 24s
[Remove gojq proxy][0] from [Willow Barraco][1]
[0]: https://lists.sr.ht/~mil/sxmo-devel/patches/50827
[1]: mailto:contact@willowbarraco.fr
✓ #1190175 SUCCESS sxmo-utils/patches/test.yml https://builds.sr.ht/~mil/job/1190175