From f13aea5b74fc3c6d85f5ab084fdd5c9532b31562 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Wed, 4 Oct 2023 02:49:55 -0700 Subject: [PATCH] Important bug fix in ioccc_status.sh script The -i version variable was actually the same name as the script version which means that if one were to use -V to determine the version they would see not the version of the script but an empty string (unless of course they first set the version with -i version). Although this is mostly a cosmetic fix it is still important as the variables served two very different purposes and should not be used for both. Instead the name of the version (variable) of the script was changed to IOCCC_STATUS_SCRIPT_VERSION. This seemed like a better way to go about it as the -i version modifies the variable in the status.json file IOCCC_status_version whereas ioccc_status.sh is the script that does it. Clever I know :-) --- tmp/src/ioccc_status/ioccc_status.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tmp/src/ioccc_status/ioccc_status.sh b/tmp/src/ioccc_status/ioccc_status.sh index d22a1c25f..2dfd3ebdd 100755 --- a/tmp/src/ioccc_status/ioccc_status.sh +++ b/tmp/src/ioccc_status/ioccc_status.sh @@ -26,7 +26,7 @@ # If the -I status_ver option is used the IOCCC_status_version field will be # updated. # -export IOCCC_STATUS_VERSION="0.0.2-0 2023-10-04" # major.minor.release-patch YYYY-MM-DD +export IOCCC_STATUS_SCRIPT_VERSION="0.0.2-0 2023-10-04" # major.minor.release-patch YYYY-MM-DD USAGE="usage: $(basename "$0") [-h] [-V] [-v level] [-s status] [-d] [-n] [-i status_ver] status.json @@ -45,7 +45,7 @@ USAGE="usage: $(basename "$0") [-h] [-V] [-v level] [-s status] [-d] [-n] [-i st status.json the file to update -status version: $IOCCC_STATUS_VERSION" +status version: $IOCCC_STATUS_SCRIPT_VERSION" export UPDATE_DATE="" export UPDATE_NEWS="" @@ -63,7 +63,7 @@ while getopts :hVv:s:dni: flag; do h) echo "$USAGE" 1>&2 exit 2 ;; - V) echo "$IOCCC_STATUS_VERSION" 1>&2 + V) echo "$IOCCC_STATUS_SCRIPT_VERSION" 1>&2 exit 2 ;; v) VERBOSITY="$OPTARG";