Skip to content

Commit

Permalink
update use of chkentry to use new arg order
Browse files Browse the repository at this point in the history
The `chkentry(1)` tool was changed so that the `.auth.json`
arg comes before the `.info.json` arg.  These changes are
needed to accommodate and document that change.

Also the use of the single arg as a directory was
removed from documentation (until issue #940 is addressed).
  • Loading branch information
lcn2 committed Jan 18, 2025
1 parent fcc7ac5 commit fa6458f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 29 deletions.
14 changes: 7 additions & 7 deletions bin/cvt-submission.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#
# "Because sometimes even the IOCCC Judges need some help." :-)
#
# Copyright (c) 2024 by Landon Curt Noll. All Rights Reserved.
# Copyright (c) 2024-2025 by Landon Curt Noll. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose and without fee is hereby granted,
Expand Down Expand Up @@ -106,7 +106,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an

# set variables referenced in the usage message
#
export VERSION="1.3.1 2024-11-16"
export VERSION="1.3.2 2025--1-18"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
Expand Down Expand Up @@ -1253,19 +1253,19 @@ fi
# perform the semantic check on .info.json and .auth.json
#
if [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: about to run: $CHKENTRY_TOOL -v 1 -- $INFO_JSON $AUTH_JSON" 1>&2
"$CHKENTRY_TOOL" -v 1 -- "$INFO_JSON" "$AUTH_JSON"
echo "$0: debug[1]: about to run: $CHKENTRY_TOOL -v 1 -- $AUTH_JSON $INFO_JSON" 1>&2
"$CHKENTRY_TOOL" -v 1 -- "$AUTH_JSON" "$INFO_JSON"
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: ERROR: $CHKENTRY_TOOL -v 1 -- $INFO_JSON $AUTH_JSON failed," \
echo "$0: ERROR: $CHKENTRY_TOOL -v 1 -- $AUTH_JSON $INFO_JSON failed," \
"error code: $status" 1>&2
exit 7
fi
else
"$CHKENTRY_TOOL" -- "$INFO_JSON" "$AUTH_JSON"
"$CHKENTRY_TOOL" -- "$AUTH_JSON" "$INFO_JSON"
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: $CHKENTRY_TOOL -- $INFO_JSON $AUTH_JSON failed," \
echo "$0: $CHKENTRY_TOOL -- $AUTH_JSON $INFO_JSON failed," \
"error code: $status" 1>&2
exit 7
fi
Expand Down
16 changes: 6 additions & 10 deletions faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -1494,20 +1494,16 @@ <h3 id="q-3.3-how-can-i-validate-my-.auth.json-andor-.info.json-files">Q 3.3: Ho
FAQ on “<a href="#info_json">.info.json</a>
for more details on these files.</p>
<p>The <code>chkentry(1)</code> tool accepts more than one command line form.
If you pass a single argument, it is expected to be a directory that has both
<code>.auth.json</code> and <code>.info.json</code> in it. You can also specify a <code>.auth.json</code> and/or
You may specify a <code>.auth.json</code> and/or
<code>.info.json</code> file. An argument of “<code>.</code>” will skip that file. For instance:</p>
<pre><code> # test entry directory test_work:
chkentry test_work

# run checks on .info.json:
chkentry .info.json .
<pre><code> # run checks on .info.json:
chkentry . .info.json

# run checks on .auth.json:
chkentry . .auth.json
chkentry .auth.json .

# run checks on .info.json and .auth.json:
chkentry .info.json .auth.json</code></pre>
# run checks on .auth.json and .info.json:
chkentry .auth.json .info.json</code></pre>
<p>If there is a <a href="https://www.json.org/json-en.html">JSON</a> issue detected by the
<code>jparse(3)</code> API, then there is a <a href="https://www.json.org/json-en.html">JSON</a> error and
<code>chkentry(1)</code> will report it as an <strong>error</strong>. If the parsing is OK (i.e. valid
Expand Down
14 changes: 5 additions & 9 deletions faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -1336,22 +1336,18 @@ FAQ on "[.info.json](#info_json)"
for more details on these files.

The `chkentry(1)` tool accepts more than one command line form.
If you pass a single argument, it is expected to be a directory that has both
`.auth.json` and `.info.json` in it. You can also specify a `.auth.json` and/or
You may specify a `.auth.json` and/or
`.info.json` file. An argument of "`.`" will skip that file. For instance:

``` <!---sh-->
# test entry directory test_work:
chkentry test_work
# run checks on .info.json:
chkentry .info.json .
chkentry . .info.json
# run checks on .auth.json:
chkentry . .auth.json
chkentry .auth.json .
# run checks on .info.json and .auth.json:
chkentry .info.json .auth.json
# run checks on .auth.json and .info.json:
chkentry .auth.json .info.json
```

If there is a [JSON](https://www.json.org/json-en.html) issue detected by the
Expand Down
6 changes: 3 additions & 3 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15210,7 +15210,7 @@
</url>
<url>
<loc>https://www.ioccc.org/bin/cvt-submission.sh</loc>
<lastmod>2025-01-10T06:06:40+00:00</lastmod>
<lastmod>2025-01-18T20:11:54+00:00</lastmod>
</url>
<url>
<loc>https://www.ioccc.org/bin/entry2csv.sh</loc>
Expand Down Expand Up @@ -15414,11 +15414,11 @@
</url>
<url>
<loc>https://www.ioccc.org/faq.html</loc>
<lastmod>2025-01-18T16:34:05+00:00</lastmod>
<lastmod>2025-01-18T20:15:51+00:00</lastmod>
</url>
<url>
<loc>https://www.ioccc.org/faq.md</loc>
<lastmod>2025-01-18T16:33:38+00:00</lastmod>
<lastmod>2025-01-18T20:13:22+00:00</lastmod>
</url>
<url>
<loc>https://www.ioccc.org/inc/index.html</loc>
Expand Down

0 comments on commit fa6458f

Please sign in to comment.