require jstrdecode to have a minimum version

As of the moment, we need version 1.2.0 or greater.
This commit is contained in:
Landon Curt Noll committed 2024-10-09 13:56:49 -07:00
1 parent 0502b79101
commit bcc4c07a92
7 files changed
+168

No files matched your search

+24
View File
@@ -135,6 +135,17 @@ if [[ $status -eq 0 ]]; then
fi
export TOPDIR
#
VERGE=$(type -P verge)
export VERGE
if [[ -z $VERGE ]]; then
echo "$0: FATAL: verge is not installed or not in \$PATH" 1>&2
echo "$0: notice: to install verge:" 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
@@ -145,6 +156,16 @@ if [[ -z $JSTRDECODE ]]; then
echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2
exit 5
fi
export MIN_JSTRDECODE_VERSION="1.2.0"
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
fi
#
export NOOP=
export DO_NOT_PROCESS=
@@ -638,7 +659,10 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
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]: NOOP=$NOOP" 1>&2
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2