update as per jstrdecode version: 2.1.2 2024-11-16
Changed `bin/` tools to require a minimum of jstrdecode version: 2.1.2 2024-11-16. Perform `make www` to perform the above and test under macOS.
This commit is contained in:
1 parent
4d5eaca811
commit
c47f3abbe4
9 files changed
+86
-76
No files matched your search
+40
-39
@@ -94,7 +94,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.3 2024-09-27"
|
export VERSION="1.3.1 2024-11-16"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -119,12 +119,35 @@ if [[ -z "$CHKENTRY_TOOL" ]]; then
|
|||||||
exit 5
|
exit 5
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
JSTRDECODE_TOOL=$(type -P jstrdecode)
|
VERGE=$(type -P verge)
|
||||||
export JSTRDECODE_TOOL
|
export VERGE
|
||||||
if [[ -z "$JSTRDECODE_TOOL" ]]; then
|
if [[ -z $VERGE ]]; then
|
||||||
echo "$0: FATAL: jstrdecode tool is not installed or not in \$PATH" 1>&2
|
echo "$0: FATAL: verge is not installed or not in \$PATH" 1>&2
|
||||||
echo "$0: Notice: if needed: $GIT_TOOL clone $MKIOCCCENTRY_REPO; cd mkiocccentry" 1>&2
|
echo "$0: notice: to install verge:" 1>&2
|
||||||
echo "$0: Notice: then if needed: make clobber all install" 1>&2
|
echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2
|
||||||
|
echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2
|
||||||
|
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
||||||
|
exit 5
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
JSTRDECODE=$(type -P jstrdecode)
|
||||||
|
export JSTRDECODE
|
||||||
|
if [[ -z $JSTRDECODE ]]; then
|
||||||
|
echo "$0: FATAL: jstrdecode is not installed or not in \$PATH" 1>&2
|
||||||
|
echo "$0: notice: to install jstrdecode:" 1>&2
|
||||||
|
echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2
|
||||||
|
echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2
|
||||||
|
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
||||||
|
exit 5
|
||||||
|
fi
|
||||||
|
export MIN_JSTRDECODE_VERSION="2.1.2"
|
||||||
|
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
||||||
|
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
||||||
|
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
||||||
|
echo "$0: notice: consider updating jstrdecode from mkiocccentry repo" 1>&2
|
||||||
|
echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2
|
||||||
|
echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2
|
||||||
|
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
||||||
exit 5
|
exit 5
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
@@ -163,7 +186,7 @@ export X_3="X""X""X"
|
|||||||
# usage
|
# usage
|
||||||
#
|
#
|
||||||
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir]
|
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir]
|
||||||
[-c chkentry] [-j jstrdecode] [-T tarball_dir]
|
[-c chkentry] [-T tarball_dir]
|
||||||
[-i input_data] [-n] [-N] YYYY/dir
|
[-i input_data] [-n] [-N] YYYY/dir
|
||||||
|
|
||||||
-h print help message and exit
|
-h print help message and exit
|
||||||
@@ -172,7 +195,6 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir]
|
|||||||
|
|
||||||
-d topdir set topdir (def: $TOPDIR)
|
-d topdir set topdir (def: $TOPDIR)
|
||||||
-c chkentry path to the chkentry tool (def: $CHKENTRY_TOOL)
|
-c chkentry path to the chkentry tool (def: $CHKENTRY_TOOL)
|
||||||
-j jstrdecode path to the jstrdecode tool (def: $JSTRDECODE_TOOL)
|
|
||||||
|
|
||||||
-T tarball_dir where to form the compressed tarball of modified files (def: $TARBALL_DIR)
|
-T tarball_dir where to form the compressed tarball of modified files (def: $TARBALL_DIR)
|
||||||
|
|
||||||
@@ -248,10 +270,10 @@ function prompt_string
|
|||||||
|
|
||||||
# JSON decode value
|
# JSON decode value
|
||||||
#
|
#
|
||||||
DECODED=$("$JSTRDECODE_TOOL" -q -n -- "$INPUT")
|
DECODED=$("$JSTRDECODE" -d -q -N -- "$INPUT")
|
||||||
status="$?"
|
status="$?"
|
||||||
if [[ $status -ne 0 || -z $DECODED ]]; then
|
if [[ $status -ne 0 || -z $DECODED ]]; then
|
||||||
echo "$0: ERROR: in prompt_string: $JSTRDECODE_TOOL -q -n -- $INPUT failed," \
|
echo "$0: ERROR: in prompt_string: $JSTRDECODE -d -q -N -- $INPUT failed," \
|
||||||
"error code: $status" 1>&2
|
"error code: $status" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -334,10 +356,10 @@ function prompt_integer
|
|||||||
if [[ $INPUT =~ ^[[:digit:]]+$ && $INPUT -ge 0 && $INPUT -le 4294967295 ]]; then
|
if [[ $INPUT =~ ^[[:digit:]]+$ && $INPUT -ge 0 && $INPUT -le 4294967295 ]]; then
|
||||||
# JSON decode value
|
# JSON decode value
|
||||||
#
|
#
|
||||||
DECODED=$("$JSTRDECODE_TOOL" -q -n -- "$INPUT")
|
DECODED=$("$JSTRDECODE" -d -q -N -- "$INPUT")
|
||||||
status="$?"
|
status="$?"
|
||||||
if [[ $status -ne 0 || -z $DECODED ]]; then
|
if [[ $status -ne 0 || -z $DECODED ]]; then
|
||||||
echo "$0: ERROR: in prompt_integer: $JSTRDECODE_TOOL -q -n -- $INPUT failed," \
|
echo "$0: ERROR: in prompt_integer: $JSTRDECODE -d -q -N -- $INPUT failed," \
|
||||||
"error code: $status" 1>&2
|
"error code: $status" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -723,7 +745,7 @@ function write_author_handle_file
|
|||||||
|
|
||||||
# parse command line
|
# parse command line
|
||||||
#
|
#
|
||||||
while getopts :hv:Vd:c:s:i:T:nN flag; do
|
while getopts :hv:Vd:c:i:T:nN flag; do
|
||||||
case "$flag" in
|
case "$flag" in
|
||||||
h) echo "$USAGE" 1>&2
|
h) echo "$USAGE" 1>&2
|
||||||
exit 2
|
exit 2
|
||||||
@@ -737,8 +759,6 @@ while getopts :hv:Vd:c:s:i:T:nN flag; do
|
|||||||
;;
|
;;
|
||||||
c) CHKENTRY_TOOL="$OPTARG"
|
c) CHKENTRY_TOOL="$OPTARG"
|
||||||
;;
|
;;
|
||||||
s) JSTRDECODE_TOOL="$OPTARG"
|
|
||||||
;;
|
|
||||||
i) INPUT_DATA_FILE="$OPTARG"
|
i) INPUT_DATA_FILE="$OPTARG"
|
||||||
;;
|
;;
|
||||||
T) TARBALL_DIR="$OPTARG"
|
T) TARBALL_DIR="$OPTARG"
|
||||||
@@ -1019,7 +1039,10 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
||||||
echo "$0: debug[3]: CHKENTRY_TOOL=$CHKENTRY_TOOL" 1>&2
|
echo "$0: debug[3]: CHKENTRY_TOOL=$CHKENTRY_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: JSTRDECODE_TOOL=$JSTRDECODE_TOOL" 1>&2
|
echo "$0: debug[3]: VERGE=$VERGE" 1>&2
|
||||||
|
echo "$0: debug[3]: JSTRDECODE=$JSTRDECODE" 1>&2
|
||||||
|
echo "$0: debug[3]: MIN_JSTRDECODE_VERSION=$MIN_JSTRDECODE_VERSION" 1>&2
|
||||||
|
echo "$0: debug[3]: JSTRDECODE_VERSION=$JSTRDECODE_VERSION" 1>&2
|
||||||
echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2
|
echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
|
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
|
||||||
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
||||||
@@ -1111,28 +1134,6 @@ if [[ ! -x $CHKENTRY_TOOL ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# firewall - verify jstrdecode tool
|
|
||||||
#
|
|
||||||
if [[ ! -e $JSTRDECODE_TOOL ]]; then
|
|
||||||
echo "$0: ERROR: jstrdecode file does not exist: $JSTRDECODE_TOOL" 1>&2
|
|
||||||
echo "$0: Notice: if needed: $GIT_TOOL clone $MKIOCCCENTRY_REPO; cd mkiocccentry" 1>&2
|
|
||||||
echo "$0: Notice: then if needed: make clobber all install" 1>&2
|
|
||||||
exit 5
|
|
||||||
fi
|
|
||||||
if [[ ! -f $JSTRDECODE_TOOL ]]; then
|
|
||||||
echo "$0: ERROR: jstrdecode is not a file: $JSTRDECODE_TOOL" 1>&2
|
|
||||||
echo "$0: Notice: if needed: $GIT_TOOL clone $MKIOCCCENTRY_REPO; cd mkiocccentry" 1>&2
|
|
||||||
echo "$0: Notice: then if needed: make clobber all install" 1>&2
|
|
||||||
exit 5
|
|
||||||
fi
|
|
||||||
if [[ ! -x $JSTRDECODE_TOOL ]]; then
|
|
||||||
echo "$0: ERROR: cannot find an executable jstrdecode tool: $JSTRDECODE_TOOL" 1>&2
|
|
||||||
echo "$0: Notice: if needed: $GIT_TOOL clone $MKIOCCCENTRY_REPO; cd mkiocccentry" 1>&2
|
|
||||||
echo "$0: Notice: then if needed: make clobber all install" 1>&2
|
|
||||||
exit 5
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# verify that YEAR is already in .top
|
# verify that YEAR is already in .top
|
||||||
#
|
#
|
||||||
if ! grep -E -q "^$YEAR_DIR$" "$TOP_FILE"; then
|
if ! grep -E -q "^$YEAR_DIR$" "$TOP_FILE"; then
|
||||||
|
|||||||
+5
-5
@@ -118,7 +118,7 @@ shopt -s lastpipe # explicitly run the last command of the pipe line in the curr
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.6 2024-10-14"
|
export VERSION="1.6.1 2024-11-16"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -156,7 +156,7 @@ if [[ -z $JSTRDECODE ]]; then
|
|||||||
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
||||||
exit 5
|
exit 5
|
||||||
fi
|
fi
|
||||||
export MIN_JSTRDECODE_VERSION="2.1.0"
|
export MIN_JSTRDECODE_VERSION="2.1.2"
|
||||||
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
||||||
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
||||||
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
||||||
@@ -378,13 +378,13 @@ function output_abstract
|
|||||||
#
|
#
|
||||||
PATTERN='$..abstract'
|
PATTERN='$..abstract'
|
||||||
if [[ $V_FLAG -ge 5 ]]; then
|
if [[ $V_FLAG -ge 5 ]]; then
|
||||||
echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N -" 1>&2
|
echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -d -q -N -" 1>&2
|
||||||
fi
|
fi
|
||||||
export ABSTRACT
|
export ABSTRACT
|
||||||
ABSTRACT=$("$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -N -)
|
ABSTRACT=$("$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -d -q -N -)
|
||||||
status_codes=("${PIPESTATUS[@]}")
|
status_codes=("${PIPESTATUS[@]}")
|
||||||
if [[ ${status_codes[*]} =~ [1-9] || -z $ABSTRACT ]]; then
|
if [[ ${status_codes[*]} =~ [1-9] || -z $ABSTRACT ]]; then
|
||||||
echo "$0: ERROR: in output_abstract: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N - failed," \
|
echo "$0: ERROR: in output_abstract: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -d -q -N - failed," \
|
||||||
"error codes: ${status_codes[*]}" 1>&2
|
"error codes: ${status_codes[*]}" 1>&2
|
||||||
return 5
|
return 5
|
||||||
fi
|
fi
|
||||||
|
|||||||
+7
-7
@@ -98,7 +98,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.14.1 2024-10-10"
|
export VERSION="1.14.2 2024-11-16"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -136,7 +136,7 @@ if [[ -z $JSTRDECODE ]]; then
|
|||||||
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
||||||
exit 5
|
exit 5
|
||||||
fi
|
fi
|
||||||
export MIN_JSTRDECODE_VERSION="2.1.0"
|
export MIN_JSTRDECODE_VERSION="2.1.2"
|
||||||
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
||||||
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
||||||
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
||||||
@@ -283,12 +283,12 @@ function output_award
|
|||||||
#
|
#
|
||||||
PATTERN='$..award'
|
PATTERN='$..award'
|
||||||
if [[ $V_FLAG -ge 5 ]]; then
|
if [[ $V_FLAG -ge 5 ]]; then
|
||||||
echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N -" 1>&2
|
echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -d -q -N -" 1>&2
|
||||||
fi
|
fi
|
||||||
"$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -N -
|
"$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -d -q -N -
|
||||||
status_codes=("${PIPESTATUS[@]}")
|
status_codes=("${PIPESTATUS[@]}")
|
||||||
if [[ ${status_codes[*]} =~ [1-9] ]]; then
|
if [[ ${status_codes[*]} =~ [1-9] ]]; then
|
||||||
echo "$0: ERROR: in output_award: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N - failed," \
|
echo "$0: ERROR: in output_award: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -d -q -N - failed," \
|
||||||
"error codes: ${status_codes[*]}" 1>&2
|
"error codes: ${status_codes[*]}" 1>&2
|
||||||
return 5
|
return 5
|
||||||
fi
|
fi
|
||||||
@@ -795,7 +795,7 @@ EOF
|
|||||||
#
|
#
|
||||||
case "$NAME" in
|
case "$NAME" in
|
||||||
full_name)
|
full_name)
|
||||||
FULL_NAME=$("$JSTRDECODE" "$VALUE")
|
FULL_NAME=$("$JSTRDECODE" -d -q -N -- "$VALUE")
|
||||||
;;
|
;;
|
||||||
location_code)
|
location_code)
|
||||||
LOCATION_CODE="$VALUE"
|
LOCATION_CODE="$VALUE"
|
||||||
@@ -816,7 +816,7 @@ EOF
|
|||||||
AUTHOR_GITHUB="$VALUE"
|
AUTHOR_GITHUB="$VALUE"
|
||||||
;;
|
;;
|
||||||
affiliation)
|
affiliation)
|
||||||
AUTHOR_AFFILIATION=$("$JSTRDECODE" "$VALUE")
|
AUTHOR_AFFILIATION=$("$JSTRDECODE" -d -q -N -- "$VALUE")
|
||||||
;;
|
;;
|
||||||
author_handle)
|
author_handle)
|
||||||
AUTHOR_HANDLE="$VALUE"
|
AUTHOR_HANDLE="$VALUE"
|
||||||
|
|||||||
+6
-3
@@ -85,7 +85,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.8.1 2024-10-10"
|
export VERSION="1.8.2 2024-11-16"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -123,7 +123,7 @@ if [[ -z $JSTRDECODE ]]; then
|
|||||||
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
||||||
exit 5
|
exit 5
|
||||||
fi
|
fi
|
||||||
export MIN_JSTRDECODE_VERSION="2.1.0"
|
export MIN_JSTRDECODE_VERSION="2.1.2"
|
||||||
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
||||||
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
||||||
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
||||||
@@ -593,7 +593,10 @@ find "$AUTHOR_DIR" -mindepth 1 -maxdepth 1 -type f -name '*.json' -print |
|
|||||||
# obtain the author full name
|
# obtain the author full name
|
||||||
#
|
#
|
||||||
PATTERN='$..full_name'
|
PATTERN='$..full_name'
|
||||||
FULL_NAME=$("$JVAL_WRAPPER" -b -q "$AUTHOR_HANDLE_JSON" "$PATTERN" | "$JSTRDECODE" -N -)
|
if [[ $V_FLAG -ge 5 ]]; then
|
||||||
|
echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $AUTHOR_HANDLE_JSON '$PATTERN' | $JSTRDECODE -d -q -N -" 1>&2
|
||||||
|
fi
|
||||||
|
FULL_NAME=$("$JVAL_WRAPPER" -b -q "$AUTHOR_HANDLE_JSON" "$PATTERN" | "$JSTRDECODE" -d -q -N -)
|
||||||
status_codes=("${PIPESTATUS[@]}")
|
status_codes=("${PIPESTATUS[@]}")
|
||||||
if [[ ${status_codes[*]} =~ [1-9] || -z $FULL_NAME ]]; then
|
if [[ ${status_codes[*]} =~ [1-9] || -z $FULL_NAME ]]; then
|
||||||
echo "$0: ERROR: cannot full name from: $AUTHOR_HANDLE" 1>&2
|
echo "$0: ERROR: cannot full name from: $AUTHOR_HANDLE" 1>&2
|
||||||
|
|||||||
+6
-3
@@ -88,7 +88,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.6.1 2024-10-10"
|
export VERSION="1.6.2 2024-11-16"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -126,7 +126,7 @@ if [[ -z $JSTRDECODE ]]; then
|
|||||||
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
||||||
exit 5
|
exit 5
|
||||||
fi
|
fi
|
||||||
export MIN_JSTRDECODE_VERSION="2.1.0"
|
export MIN_JSTRDECODE_VERSION="2.1.2"
|
||||||
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
||||||
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
||||||
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
||||||
@@ -247,7 +247,10 @@ function output_award
|
|||||||
# obtain the award string
|
# obtain the award string
|
||||||
#
|
#
|
||||||
PATTERN='$..award'
|
PATTERN='$..award'
|
||||||
AWARD_STRING=$("$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -N -)
|
if [[ $V_FLAG -ge 5 ]]; then
|
||||||
|
echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q $ENTRY_JSON_PATH \"$PATTERN\" | $JSTRDECODE -d -q -N -" 1>&2
|
||||||
|
fi
|
||||||
|
AWARD_STRING=$("$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -d -q -N -)
|
||||||
status_codes=("${PIPESTATUS[@]}")
|
status_codes=("${PIPESTATUS[@]}")
|
||||||
if [[ ${status_codes[*]} =~ [1-9] || -z $AWARD_STRING ]]; then
|
if [[ ${status_codes[*]} =~ [1-9] || -z $AWARD_STRING ]]; then
|
||||||
echo "$0: ERROR: in output_award: no award found in .entry.json file: $ENTRY_JSON_PATH" 1>&2
|
echo "$0: ERROR: in output_award: no award found in .entry.json file: $ENTRY_JSON_PATH" 1>&2
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ BEGIN {
|
|||||||
|
|
||||||
# setup
|
# setup
|
||||||
#
|
#
|
||||||
VERSION="1.2 2024-09-17"
|
VERSION="1.2.1 2024-11-16"
|
||||||
found_manifest_array = 0; # 1 ==> we found the manifest ARRAY
|
found_manifest_array = 0; # 1 ==> we found the manifest ARRAY
|
||||||
within_manifest_array = 0; # 1 ==> found start of "manifest" : [ JSON array
|
within_manifest_array = 0; # 1 ==> found start of "manifest" : [ JSON array
|
||||||
begin_manifest_element = 0; # 1 ==> we have found the start of the manifest array element
|
begin_manifest_element = 0; # 1 ==> we have found the start of the manifest array element
|
||||||
@@ -308,9 +308,9 @@ within_manifest_array == 1 && begin_manifest_element == 1 && NF >= 3 && $1 ~ /^"
|
|||||||
# form the jstrdecode command
|
# form the jstrdecode command
|
||||||
#
|
#
|
||||||
if (jstrdecode_arg ~ /^".*"$/) {
|
if (jstrdecode_arg ~ /^".*"$/) {
|
||||||
jstrdecode_cmd = "jstrdecode -Q -- " "'" substr(jstrdecode_arg, 2, length(jstrdecode_arg)-2) "'";
|
jstrdecode_cmd = "jstrdecode -d -q -Q -- " "'" substr(jstrdecode_arg, 2, length(jstrdecode_arg)-2) "'";
|
||||||
} else {
|
} else {
|
||||||
jstrdecode_cmd = "jstrdecode -Q -- " "'" jstrdecode_arg "'";
|
jstrdecode_cmd = "jstrdecode -d -q -Q -- " "'" jstrdecode_arg "'";
|
||||||
}
|
}
|
||||||
jstrdecode_cmd = jstrdecode_cmd " 2>/dev/null; echo $?";
|
jstrdecode_cmd = jstrdecode_cmd " 2>/dev/null; echo $?";
|
||||||
|
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.10.1 2024-10-10"
|
export VERSION="1.10.2 2024-11-16"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -142,7 +142,7 @@ if [[ -z $JSTRDECODE ]]; then
|
|||||||
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
||||||
exit 5
|
exit 5
|
||||||
fi
|
fi
|
||||||
export MIN_JSTRDECODE_VERSION="2.1.0"
|
export MIN_JSTRDECODE_VERSION="2.1.2"
|
||||||
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
||||||
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
||||||
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
||||||
@@ -345,10 +345,13 @@ function output_full_name
|
|||||||
# extract Full Name from the author/author_handle.json file
|
# extract Full Name from the author/author_handle.json file
|
||||||
#
|
#
|
||||||
PATTERN='$..full_name'
|
PATTERN='$..full_name'
|
||||||
"$JVAL_WRAPPER" -b -q "$AUTHOR_HANDLE_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -N -
|
if [[ $V_FLAG -ge 5 ]]; then
|
||||||
|
echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $AUTHOR_HANDLE_JSON_PATH '$PATTERN' | $JSTRDECODE -d -q -N -" 1>&2
|
||||||
|
fi
|
||||||
|
"$JVAL_WRAPPER" -b -q "$AUTHOR_HANDLE_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -d -q -N -
|
||||||
status_codes=("${PIPESTATUS[@]}")
|
status_codes=("${PIPESTATUS[@]}")
|
||||||
if [[ ${status_codes[*]} =~ [1-9] ]]; then
|
if [[ ${status_codes[*]} =~ [1-9] ]]; then
|
||||||
echo "$0: ERROR: in output_full_name: $JVAL_WRAPPER -b -q $AUTHOR_HANDLE_JSON_PATH '$PATTERN' | $JSTRDECODE -N - failed," \
|
echo "$0: ERROR: in output_full_name: $JVAL_WRAPPER -b -q $AUTHOR_HANDLE_JSON_PATH '$PATTERN' | $JSTRDECODE -d -q -N - failed," \
|
||||||
"error codes: ${status_codes[*]}" 1>&2
|
"error codes: ${status_codes[*]}" 1>&2
|
||||||
return 5
|
return 5
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.6.1 2024-10-10"
|
export VERSION="1.6.2 2024-11-16"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -161,7 +161,7 @@ if [[ -z $JSTRDECODE ]]; then
|
|||||||
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
||||||
exit 5
|
exit 5
|
||||||
fi
|
fi
|
||||||
export MIN_JSTRDECODE_VERSION="2.1.0"
|
export MIN_JSTRDECODE_VERSION="2.1.2"
|
||||||
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
||||||
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
||||||
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
||||||
@@ -259,12 +259,12 @@ function output_award
|
|||||||
#
|
#
|
||||||
PATTERN='$..award'
|
PATTERN='$..award'
|
||||||
if [[ $V_FLAG -ge 5 ]]; then
|
if [[ $V_FLAG -ge 5 ]]; then
|
||||||
echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N -" 1>&2
|
echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -d -q -N -" 1>&2
|
||||||
fi
|
fi
|
||||||
"$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -N -
|
"$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -d -q -N -
|
||||||
status_codes=("${PIPESTATUS[@]}")
|
status_codes=("${PIPESTATUS[@]}")
|
||||||
if [[ ${status_codes[*]} =~ [1-9] ]]; then
|
if [[ ${status_codes[*]} =~ [1-9] ]]; then
|
||||||
echo "$0: ERROR: in output_award: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N - failed," \
|
echo "$0: ERROR: in output_award: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -d -q -N - failed," \
|
||||||
"error codes: ${status_codes[*]}" 1>&2
|
"error codes: ${status_codes[*]}" 1>&2
|
||||||
return 5
|
return 5
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ if [[ -z $JSTRDECODE ]]; then
|
|||||||
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
|
||||||
exit 5
|
exit 5
|
||||||
fi
|
fi
|
||||||
export MIN_JSTRDECODE_VERSION="2.1.0"
|
export MIN_JSTRDECODE_VERSION="2.1.2"
|
||||||
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}')
|
||||||
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then
|
||||||
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2
|
||||||
@@ -254,12 +254,12 @@ function output_award
|
|||||||
#
|
#
|
||||||
PATTERN='$..award'
|
PATTERN='$..award'
|
||||||
if [[ $V_FLAG -ge 5 ]]; then
|
if [[ $V_FLAG -ge 5 ]]; then
|
||||||
echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N - | sed -f $HTML_SED" 1>&2
|
echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -d -q -N - | sed -f $HTML_SED" 1>&2
|
||||||
fi
|
fi
|
||||||
"$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -N - | sed -f "$HTML_SED"
|
"$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -d -q -N - | sed -f "$HTML_SED"
|
||||||
status_codes=("${PIPESTATUS[@]}")
|
status_codes=("${PIPESTATUS[@]}")
|
||||||
if [[ ${status_codes[*]} =~ [1-9] ]]; then
|
if [[ ${status_codes[*]} =~ [1-9] ]]; then
|
||||||
echo "$0: ERROR: in output_award: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N - | sed -f $HTML_SED failed," \
|
echo "$0: ERROR: in output_award: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -d -q -N - | sed -f $HTML_SED failed," \
|
||||||
"error codes: ${status_codes[*]}" 1>&2
|
"error codes: ${status_codes[*]}" 1>&2
|
||||||
return 5
|
return 5
|
||||||
fi
|
fi
|
||||||
@@ -305,12 +305,12 @@ function output_abstract
|
|||||||
#
|
#
|
||||||
PATTERN='$..abstract'
|
PATTERN='$..abstract'
|
||||||
if [[ $V_FLAG -ge 5 ]]; then
|
if [[ $V_FLAG -ge 5 ]]; then
|
||||||
echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N - | sed -f $HTML_SED" 1>&2
|
echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -d -q -N - | sed -f $HTML_SED" 1>&2
|
||||||
fi
|
fi
|
||||||
"$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -N - | sed -f "$HTML_SED"
|
"$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -d -q -N - | sed -f "$HTML_SED"
|
||||||
status_codes=("${PIPESTATUS[@]}")
|
status_codes=("${PIPESTATUS[@]}")
|
||||||
if [[ ${status_codes[*]} =~ [1-9] ]]; then
|
if [[ ${status_codes[*]} =~ [1-9] ]]; then
|
||||||
echo "$0: ERROR: in output_abstract: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN | $JSTRDECODE -N - | sed -f $HTML_SED failed," \
|
echo "$0: ERROR: in output_abstract: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN | $JSTRDECODE -d -q -N - | sed -f $HTML_SED failed," \
|
||||||
"error codes: ${status_codes[*]}" 1>&2
|
"error codes: ${status_codes[*]}" 1>&2
|
||||||
return 5
|
return 5
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in new issue
Block a user