From c74c76f8b72360866d86062f9d7799c7ed127010 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Thu, 27 Feb 2025 05:05:19 -0800 Subject: [PATCH] Fix bin/cvt-submission - check chkentry version The minimum version for cvt-submission of chkentry is 1.1.5, the most recent version. Technically the previous version would work too but 1.1.5 renamed some variables to make it more consistent with the mkiocccentry terminology so it's better to have 1.1.5. --- bin/cvt-submission.sh | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/bin/cvt-submission.sh b/bin/cvt-submission.sh index 4dcc1a337..7a4587d01 100755 --- a/bin/cvt-submission.sh +++ b/bin/cvt-submission.sh @@ -122,15 +122,6 @@ if [[ $status -eq 0 ]]; then TOPDIR=$("$GIT_TOOL" rev-parse --show-toplevel) fi # -CHKENTRY_TOOL=$(type -P chkentry) -export CHKENTRY_TOOL -if [[ -z "$CHKENTRY_TOOL" ]]; then - echo "$0: FATAL: chkentry tool 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: then if needed: make clobber all install" 1>&2 - exit 5 -fi -# VERGE=$(type -P verge) export VERGE if [[ -z $VERGE ]]; then @@ -163,6 +154,25 @@ if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then exit 5 fi # +CHKENTRY_TOOL=$(type -P chkentry) +export CHKENTRY_TOOL +if [[ -z "$CHKENTRY_TOOL" ]]; then + echo "$0: FATAL: chkentry tool 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: then if needed: make clobber all install" 1>&2 + exit 5 +fi +export MIN_CHKENTRY_VERSION="1.1.5" +CHKENTRY_VERSION=$("$CHKENTRY" -V | head -1 | awk '{print $3;}') +if ! "$VERGE" "$CHKENTRY_VERSION" "$MIN_CHKENTRY_VERSION"; then + echo "$0: FATAL: chkentry version: $CHKENTRY_VERSION < minimum version: $MIN_CHKENTRY_VERSION" 1>&2 + echo "$0: notice: consider updating chkentry 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 +# GTAR_TOOL=$(type -P gtar) export GTAR_TOOL if [[ -z "$GIT_TOOL" ]]; then