From 8ed2de8456b2354e44b3c14d6bbee45502f743ea Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Mon, 21 Apr 2025 01:28:19 -0700 Subject: [PATCH] update bin tools to use JSONPath.sh Version 0.0.22 The `JSONPath.sh` has been updated (and bug fixed). The `-A` option is gone and `-4` has been added. See: https://github.com/lcn2/JSONPath.sh Changed `bin/jfmt-wrapper.sh` VERSION from "2.0.0 2025-03-13" to "2.0.1 2025-04-21". Changed `bin/jprint-wrapper.sh` VERSION from "2.0.0 2025-03-13" to "2.0.1 2025-04-21". Changed `bin/jval-wrapper.sh` VERSION from "2.0.0 2025-03-13" to "2.0.1 2025-04-21". Tested the above via `make www gen_status gen_sitemap timestamp` on macOS. --- bin/jfmt-wrapper.sh | 24 ++++++++++++------------ bin/jprint-wrapper.sh | 28 ++++++++++++++-------------- bin/jval-wrapper.sh | 8 ++++---- sitemap.xml | 6 +++--- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/bin/jfmt-wrapper.sh b/bin/jfmt-wrapper.sh index 90ddfdba5..309592cd6 100755 --- a/bin/jfmt-wrapper.sh +++ b/bin/jfmt-wrapper.sh @@ -128,7 +128,7 @@ export LC_ALL="C" # set variables referenced in the usage message # -export VERSION="2.0.0 2025-03-13" +export VERSION="2.0.1 2025-04-21" NAME=$(basename "$0") export NAME export V_FLAG=0 @@ -358,7 +358,7 @@ case "$XPATHJSON_USE" in echo "$0: ERROR: JSONPath.sh tool is not installed, is not executable, or not in \$PATH" 1>&2 echo "$0: notice: obtain jsp from: $JSP_REPO" 1>&2 echo "$0: notice: or obtain jsp via \"pipx install jsp\" and placing ~/.local/bin in \$PATH" 1>&2 - echo "$0: notice: obtain JSONPath.sh from: $JSONPATH_REPO" 1>&2 + echo "$0: notice: obtain JSONPath.sh version 0.0.22 or later from: $JSONPATH_REPO" 1>&2 echo "$0: notice: if possible install jsp instead of JSONPath.sh as jsp is faster" 1>&2 exit 5 fi @@ -366,12 +366,12 @@ case "$XPATHJSON_USE" in # case: -Q - perform quick check # if [[ -n $QUICK_CHECK ]]; then - # verify JSONPath.sh supports -S -A -p - if ! "$JSONPATH_SH" -S -A -p >/dev/null 2>&1; then - echo "$0: ERROR: JSONPath.sh tool does not support -S -A: $FIZZBIN_JSON" 1>&2 + # verify JSONPath.sh supports -S -4 -p + if ! "$JSONPATH_SH" -S -4 -p >/dev/null 2>&1; then + echo "$0: ERROR: JSONPath.sh tool does not support -S -4 -p: $FIZZBIN_JSON" 1>&2 echo "$0: notice: we recommend you obtain and install jsp from: $JSP_REPO" 1>&2 echo "$0: notice: or obtain jsp via \"pipx install jsp\" and placing ~/.local/bin in \$PATH" 1>&2 - echo "$0: notice: otherwise install JSONPath.sh from: $JSONPATH_REPO" 1>&2 + echo "$0: notice: otherwise install JSONPath.sh version 0.0.22 or later from: $JSONPATH_REPO" 1>&2 echo "$0: notice: if possible install jsp instead of JSONPath.sh as jsp is faster" 1>&2 exit 5 fi <<< "$FIZZBIN_JSON" @@ -388,7 +388,7 @@ case "$XPATHJSON_USE" in echo "$0: ERROR: jsp.sh tool is not installed, is not executable, or not in \$PATH" 1>&2 echo "$0: notice: obtain jsp from: $JSP_REPO" 1>&2 echo "$0: notice: or obtain jsp via \"pipx install jsp\" and placing ~/.local/bin in \$PATH" 1>&2 - echo "$0: notice: obtain JSONPath.sh from: $JSONPATH_REPO" 1>&2 + echo "$0: notice: obtain JSONPath.sh version 0.0.22 or later from: $JSONPATH_REPO" 1>&2 echo "$0: notice: if possible install jsp instead of JSONPath.sh as jsp is faster" 1>&2 exit 5 fi @@ -401,7 +401,7 @@ case "$XPATHJSON_USE" in echo "$0: ERROR: jsp tool does not support --indent 4 --format --no-color: $FIZZBIN_JSON" 1>&2 echo "$0: notice: you might need to update and reinstall jsp from: $JSP_REPO" 1>&2 echo "$0: notice: or obtain jsp via \"pipx install jsp\" and placing ~/.local/bin in \$PATH" 1>&2 - echo "$0: notice: or you might try to obtain and install JSONPath.sh from: $JSONPATH_REPO" 1>&2 + echo "$0: notice: or you might try to obtain and install JSONPath.sh version 0.0.22 or later from: $JSONPATH_REPO" 1>&2 echo "$0: notice: if possible install jsp instead of JSONPath.sh as jsp is faster" 1>&2 exit 5 fi <<< "$FIZZBIN_JSON" @@ -414,7 +414,7 @@ case "$XPATHJSON_USE" in echo "$0: ERROR: cannot find an XPath JSON tool to use" 1>&2 echo "$0: notice: we recommend you obtain and install jsp from: $JSP_REPO" 1>&2 echo "$0: notice: or obtain jsp via \"pipx install jsp\" and placing ~/.local/bin in \$PATH" 1>&2 - echo "$0: notice: otherwise install JSONPath.sh from: $JSONPATH_REPO" 1>&2 + echo "$0: notice: otherwise install JSONPath.sh version 0.0.22 or later from: $JSONPATH_REPO" 1>&2 echo "$0: notice: if possible install jsp instead of JSONPath.sh as jsp is faster" 1>&2 exit 5 ;; @@ -523,12 +523,12 @@ case "$XPATHJSON_USE" in JSONPath.sh) if [[ $V_FLAG -ge 3 ]]; then - echo "$0: debug[3]: about to: $JSONPATH_SH -S -A -j -f $JSON_FILE > $TMP_JSON_FILE" 1>&2 + echo "$0: debug[3]: about to: $JSONPATH_SH -S -4 -j -f $JSON_FILE > $TMP_JSON_FILE" 1>&2 fi - "$JSONPATH_SH" -S -A -j -f "$JSON_FILE" > "$TMP_JSON_FILE" + "$JSONPATH_SH" -S -4 -j -f "$JSON_FILE" > "$TMP_JSON_FILE" status="$?" if [[ $status -ne 0 ]]; then - echo "$0: ERROR: $JSONPATH_SH -S -A -j -f $JSON_FILE > $TMP_JSON_FILE failed," \ + echo "$0: ERROR: $JSONPATH_SH -S -4 -j -f $JSON_FILE > $TMP_JSON_FILE failed," \ "error code: $status" 1>&2 exit 1 fi diff --git a/bin/jprint-wrapper.sh b/bin/jprint-wrapper.sh index 75ca2e371..d7023cd71 100755 --- a/bin/jprint-wrapper.sh +++ b/bin/jprint-wrapper.sh @@ -128,7 +128,7 @@ export LC_ALL="C" # set variables referenced in the usage message # -export VERSION="2.0.0 2025-03-13" +export VERSION="2.0.1 2025-04-21" NAME=$(basename "$0") export NAME export V_FLAG=0 @@ -359,7 +359,7 @@ case "$XPATHJSON_USE" in echo "$0: ERROR: JSONPath.sh tool is not installed, is not executable, or not in \$PATH" 1>&2 echo "$0: notice: obtain jsp from: $JSP_REPO" 1>&2 echo "$0: notice: or obtain jsp via \"pipx install jsp\" and placing ~/.local/bin in \$PATH" 1>&2 - echo "$0: notice: obtain JSONPath.sh from: $JSONPATH_REPO" 1>&2 + echo "$0: notice: obtain JSONPath.sh version 0.0.22 or later from: $JSONPATH_REPO" 1>&2 echo "$0: notice: if possible install jsp instead of JSONPath.sh as jsp is faster" 1>&2 exit 5 fi @@ -367,12 +367,12 @@ case "$XPATHJSON_USE" in # case: -Q - perform quick check # if [[ -n $QUICK_CHECK ]]; then - # verify JSONPath.sh supports -S -A -p - if ! "$JSONPATH_SH" -S -A -p >/dev/null 2>&1; then - echo "$0: ERROR: JSONPath.sh tool does not support -S -A: $FIZZBIN_JSON" 1>&2 + # verify JSONPath.sh supports -S -4 -p + if ! "$JSONPATH_SH" -S -4 -p >/dev/null 2>&1; then + echo "$0: ERROR: JSONPath.sh tool does not support -S -4 -p: $FIZZBIN_JSON" 1>&2 echo "$0: notice: we recommend you obtain and install jsp from: $JSP_REPO" 1>&2 echo "$0: notice: or obtain jsp via \"pipx install jsp\" and placing ~/.local/bin in \$PATH" 1>&2 - echo "$0: notice: otherwise install JSONPath.sh from: $JSONPATH_REPO" 1>&2 + echo "$0: notice: otherwise install JSONPath.sh version 0.0.22 or later from: $JSONPATH_REPO" 1>&2 echo "$0: notice: if possible install jsp instead of JSONPath.sh as jsp is faster" 1>&2 exit 5 fi <<< "$FIZZBIN_JSON" @@ -402,7 +402,7 @@ case "$XPATHJSON_USE" in echo "$0: ERROR: jsp tool does not support --indent 4 --format --no-color: $FIZZBIN_JSON" 1>&2 echo "$0: notice: you might need to update and reinstall jsp from: $JSP_REPO" 1>&2 echo "$0: notice: or obtain jsp via \"pipx install jsp\" and placing ~/.local/bin in \$PATH" 1>&2 - echo "$0: notice: or you might try to obtain and install JSONPath.sh from: $JSONPATH_REPO" 1>&2 + echo "$0: notice: or you might try to obtain and install JSONPath.sh version 0.0.22 or later from: $JSONPATH_REPO" 1>&2 echo "$0: notice: if possible install jsp instead of JSONPath.sh as jsp is faster" 1>&2 exit 5 fi <<< "$FIZZBIN_JSON" @@ -415,7 +415,7 @@ case "$XPATHJSON_USE" in echo "$0: ERROR: cannot find an XPath JSON tool to use" 1>&2 echo "$0: notice: we recommend you obtain and install jsp from: $JSP_REPO" 1>&2 echo "$0: notice: or obtain jsp via \"pipx install jsp\" and placing ~/.local/bin in \$PATH" 1>&2 - echo "$0: notice: otherwise install JSONPath.sh from: $JSONPATH_REPO" 1>&2 + echo "$0: notice: otherwise install JSONPath.sh version 0.0.22 or later from: $JSONPATH_REPO" 1>&2 echo "$0: notice: if possible install jsp instead of JSONPath.sh as jsp is faster" 1>&2 exit 5 ;; @@ -533,12 +533,12 @@ case "$XPATHJSON_USE" in # if [[ -z $JSON_FILE ]]; then if [[ $V_FLAG -ge 3 ]]; then - echo "$0: debug[3]: about to: $JSONPATH_SH -S -A -j" 1>&2 + echo "$0: debug[3]: about to: $JSONPATH_SH -S -4 -j" 1>&2 fi - "$JSONPATH_SH" -S -A -j + "$JSONPATH_SH" -S -4 -j status="$?" if [[ $status -ne 0 ]]; then - echo "$0: ERROR: $JSONPATH_SH -S -A -j failed," \ + echo "$0: ERROR: $JSONPATH_SH -S -4 -j failed," \ "error code: $status" 1>&2 exit 1 fi @@ -547,12 +547,12 @@ case "$XPATHJSON_USE" in # else if [[ $V_FLAG -ge 3 ]]; then - echo "$0: debug[3]: about to: $JSONPATH_SH -S -A -j -f $JSON_FILE" 1>&2 + echo "$0: debug[3]: about to: $JSONPATH_SH -S -4 -j -f $JSON_FILE" 1>&2 fi - "$JSONPATH_SH" -S -A -j -f "$JSON_FILE" + "$JSONPATH_SH" -S -4 -j -f "$JSON_FILE" status="$?" if [[ $status -ne 0 ]]; then - echo "$0: ERROR: $JSONPATH_SH -S -A -j -f $JSON_FILE failed," \ + echo "$0: ERROR: $JSONPATH_SH -S -4 -j -f $JSON_FILE failed," \ "error code: $status" 1>&2 exit 1 fi diff --git a/bin/jval-wrapper.sh b/bin/jval-wrapper.sh index de918f540..ec46a001f 100755 --- a/bin/jval-wrapper.sh +++ b/bin/jval-wrapper.sh @@ -112,7 +112,7 @@ export LC_ALL="C" # set variables referenced in the usage message # -export VERSION="2.0.0 2025-03-13" +export VERSION="2.0.1 2025-04-21" NAME=$(basename "$0") export NAME export V_FLAG=0 @@ -372,9 +372,9 @@ case "$XPATHJSON_USE" in # case: -Q - perform quick check # if [[ -n $QUICK_CHECK ]]; then - # verify JSONPath.sh supports -S -A -p - if ! "$JSONPATH_SH" -S -A -p >/dev/null 2>&1; then - echo "$0: ERROR: JSONPath.sh tool does not support -S -A: $FIZZBIN_JSON" 1>&2 + # verify JSONPath.sh supports -S -4 -p + if ! "$JSONPATH_SH" -S -4 -p >/dev/null 2>&1; then + echo "$0: ERROR: JSONPath.sh tool does not support -S -4 -p: $FIZZBIN_JSON" 1>&2 echo "$0: notice: we recommend you obtain and install jsp from: $JSP_REPO" 1>&2 echo "$0: notice: or obtain jsp via \"pipx install jsp\" and placing ~/.local/bin in \$PATH" 1>&2 echo "$0: notice: otherwise install JSONPath.sh from: $JSONPATH_REPO" 1>&2 diff --git a/sitemap.xml b/sitemap.xml index 6690482db..6c0898e1d 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -15274,15 +15274,15 @@ https://www.ioccc.org/bin/jfmt-wrapper.sh - 2025-04-16T20:59:19+00:00 + 2025-04-21T07:52:21+00:00 https://www.ioccc.org/bin/jprint-wrapper.sh - 2025-04-16T20:59:19+00:00 + 2025-04-21T07:52:00+00:00 https://www.ioccc.org/bin/jval-wrapper.sh - 2025-04-16T20:59:19+00:00 + 2025-04-21T08:26:44+00:00 https://www.ioccc.org/bin/manifest.csv.entry.awk