From 8afe1f5078a997201f75556734df0d14d5dd1416 Mon Sep 17 00:00:00 2001 From: Thomas Lehmann Date: Wed, 13 Nov 2024 16:17:25 +0100 Subject: [PATCH] feat: remove jq dependency It's currently only used in one place. Let's reduce dependencies. --- configure.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/configure.sh b/configure.sh index c87a75e..e7a4232 100755 --- a/configure.sh +++ b/configure.sh @@ -16,10 +16,6 @@ checks() { if ! which php >/dev/null 2>&1; then fail "Error: php is required" fi - - if ! which jq >/dev/null 2>&1; then - fail "Error: jq is required" - fi } config_server() { @@ -95,8 +91,7 @@ add_config_partials() { main() { checks - # Redirecting jq's stderr to drop parser error message that we can test for it - local status="$( ooc status --output json 2>/dev/null | jq '.installed' 2>/dev/null )" + local status="$( ooc status 2>/dev/null | grep 'installed: ' | sed -r 's/^.*installed: (.+)$/\1/' )" # Parse validation if [ "${status}" != "true" ] && [ "${status}" != false ]; then