Change website scripts to use jstrencode

After the swap in the jparse repo of jstrencode and jstrdecode, due to
mix-up in terminology, originally in the mkiocccentry repo, the website
tools that used jstrdecode now have to use jstrencode, with a minimum
version of 2.0.0.

The scripts have been updated to do this. After doing a make install
from the jparse repo I did a make www with no html files changed. Then
doing the same thing after make install from the mkiocccentry/jparse
directory, no changes were made either, indicating that all should be
okay.

The bin/index.html was however modified to refer to jstrencode, not
jstrdecode.
This commit is contained in:
Cody Boone Ferguson committed 2024-11-01 06:45:02 -07:00
1 parent 184cc9be9a
commit e58bd97211
11 files changed
+131 -131

No files matched your search

+14 -14
View File
@@ -113,21 +113,21 @@ if [[ -z $VERGE ]]; then
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
JSTRENCODE=$(type -P jstrencode)
export JSTRENCODE
if [[ -z $JSTRENCODE ]]; then
echo "$0: FATAL: jstrencode is not installed or not in \$PATH" 1>&2
echo "$0: notice: to install jstrencode:" 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="1.2.3"
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
export MIN_JSTRENCODE_VERSION="2.0.0"
JSTRENCODE_VERSION=$("$JSTRENCODE" -V | head -1 | awk '{print $3;}')
if ! "$VERGE" "$JSTRENCODE_VERSION" "$MIN_JSTRENCODE_VERSION"; then
echo "$0: FATAL: jstrencode version: $JSTRENCODE_VERSION < minimum version: $MIN_JSTRENCODE_VERSION" 1>&2
echo "$0: notice: consider updating jstrencode 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
@@ -441,9 +441,9 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 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]: JSTRENCODE=$JSTRENCODE" 1>&2
echo "$0: debug[3]: MIN_JSTRENCODE_VERSION=$MIN_JSTRENCODE_VERSION" 1>&2
echo "$0: debug[3]: JSTRENCODE_VERSION=$JSTRENCODE_VERSION" 1>&2
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
@@ -593,7 +593,7 @@ find "$AUTHOR_DIR" -mindepth 1 -maxdepth 1 -type f -name '*.json' -print |
# obtain the author full name
#
PATTERN='$..full_name'
FULL_NAME=$("$JVAL_WRAPPER" -b -q "$AUTHOR_HANDLE_JSON" "$PATTERN" | "$JSTRDECODE" -N -)
FULL_NAME=$("$JVAL_WRAPPER" -b -q "$AUTHOR_HANDLE_JSON" "$PATTERN" | "$JSTRENCODE" -N -)
status_codes=("${PIPESTATUS[@]}")
if [[ ${status_codes[*]} =~ [1-9] || -z $FULL_NAME ]]; then
echo "$0: ERROR: cannot full name from: $AUTHOR_HANDLE" 1>&2