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 :-)
This commit is contained in:
1 parent
2e5cd0f16b
commit
f13aea5b74
1 file changed
+3
-3
@@ -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";
|
||||
|
||||
Reference in new issue
Block a user