fix chk-entry and sorting

Use of `sort(1)` with -u appears to be problematic.
As an example, using `sort -d -u` for both "c11" and "c++11"
will produce only "c11".  This where we do not strictly
need to do so, we do not use -u with `sort(1)`.

With the above, fixed `bin/chk-entry.sh -v 3 2018/burton2`
under Linux.

Changed `bin/chk-entry.sh` VERSION from "1.1.4 2024-03-26"
to "1.1.5 2024-03-27".

Changed `bin/gen-sitemap.sh` VERSION from "1.3.3 2024-03-26"
to "1.3.4 2024-03-27".

Changed `bin/output-index-inventory.sh` VERSION from "1.2.3 2024-03-26"
to "1.2.4 2024-03-27".

Changed `bin/tar-all.sh` VERSION from "1.1.2 2024-03-26"
to "1.1.3 2024-03-27".

Changed `bin/tar-year.sh` VERSION from "1.1.2 2024-03-26"
to "1.1.3 2024-03-27".

Ran `make www` to test the above.  The `index.html` for the
`2018/burton2` entry was updated.

Ran `make form_entry_tarball` to test the above.  Some recently
updated entries plus the `2018/burton2` entry was updated.

TODO: Test the results under Linux.

TODO: Update `bin/tar-year.sh`.  Update year level compressed tarballs.

TODO: Update `bin/tar-all.sh`.  Update top level compressed tarball.

TODO: Write `bin/untar-year.sh` and `bin/untar-all.sh`.
This commit is contained in:
Landon Curt Noll committed 2024-03-27 02:03:28 -07:00
1 parent c176b51cec
commit 73f41e9c74
16 files changed
+37 -28

No files matched your search

+1 -1
View File
@@ -1 +1 @@
1711433366 1711530107
+1 -1
View File
@@ -1 +1 @@
1711433361 1711530104
+1 -1
View File
@@ -1 +1 @@
1711433360 1711530104
Binary file not shown.
+1
View File
@@ -512,6 +512,7 @@ are not recognised when written as <code>-rs</code> in prose).</p>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/ansi">ansi</a> - reserved words for a given C standard</li> <li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/ansi">ansi</a> - reserved words for a given C standard</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/author-README.txt">author-README.txt</a> - author supplied README</li> <li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/author-README.txt">author-README.txt</a> - author supplied README</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/c++11">c++11</a> - reserved words for a given C standard</li> <li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/c++11">c++11</a> - reserved words for a given C standard</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/c11">c11</a> - reserved words for a given C standard</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/c++14">c++14</a> - reserved words for a given C standard</li> <li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/c++14">c++14</a> - reserved words for a given C standard</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/c++98">c++98</a> - reserved words for a given C standard</li> <li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/c++98">c++98</a> - reserved words for a given C standard</li>
<li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/c99">c99</a> - reserved words for a given C standard</li> <li><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/2018/burton2/c99">c99</a> - reserved words for a given C standard</li>
+1 -1
View File
@@ -1 +1 @@
1711433366 1711530107
+1 -1
View File
@@ -1 +1 @@
1711433365 1711530106
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
1711433365 1711530107
Binary file not shown.
+13 -5
View File
@@ -83,7 +83,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
# set variables referenced in the usage message # set variables referenced in the usage message
# #
export VERSION="1.1.4 2024-03-26" export VERSION="1.1.5 2024-03-27"
NAME=$(basename "$0") NAME=$(basename "$0")
export NAME export NAME
export V_FLAG=0 export V_FLAG=0
@@ -438,10 +438,10 @@ if [[ $status -ne 0 ]]; then
echo "$0: ERROR: awk -f $FILELIST_ENTRY_JSON_AWK $ENTRY_JSON > $TMP_MANIFEST_LIST failed, error: $status" 1>&2 echo "$0: ERROR: awk -f $FILELIST_ENTRY_JSON_AWK $ENTRY_JSON > $TMP_MANIFEST_LIST failed, error: $status" 1>&2
exit 1 exit 1
fi fi
LC_ALL=C sort -d -u "$TMP_MANIFEST_LIST" -o "$TMP_MANIFEST_LIST" LC_ALL=C sort -d "$TMP_MANIFEST_LIST" -o "$TMP_MANIFEST_LIST"
status="$?" status="$?"
if [[ $status -ne 0 ]]; then if [[ $status -ne 0 ]]; then
echo "$0: ERROR: LC_ALL=C sort -d -u $TMP_MANIFEST_LIST -o $TMP_MANIFEST_LIST failed, error: $status" 1>&2 echo "$0: ERROR: LC_ALL=C sort -d $TMP_MANIFEST_LIST -o $TMP_MANIFEST_LIST failed, error: $status" 1>&2
exit 1 exit 1
fi fi
@@ -455,15 +455,23 @@ if [[ $status -ne 0 ]]; then
echo "$0: ERROR: find $ENTRY_PATH -type f -print > $TMP_FILE_LIST failed, error: $status" 1>&2 echo "$0: ERROR: find $ENTRY_PATH -type f -print > $TMP_FILE_LIST failed, error: $status" 1>&2
exit 1 exit 1
fi fi
LC_ALL=C sort -d -u "$TMP_FILE_LIST" -o "$TMP_FILE_LIST" LC_ALL=C sort -d "$TMP_FILE_LIST" -o "$TMP_FILE_LIST"
status="$?" status="$?"
if [[ $status -ne 0 ]]; then if [[ $status -ne 0 ]]; then
echo "$0: ERROR: LC_ALL=C sort -d -u $TMP_FILE_LIST -o $TMP_FILE_LIST failed, error: $status" 1>&2 echo "$0: ERROR: LC_ALL=C sort -d $TMP_FILE_LIST -o $TMP_FILE_LIST failed, error: $status" 1>&2
exit 1 exit 1
fi fi
# note if the manifest does NOT match the file list # note if the manifest does NOT match the file list
# #
if [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5] file manifest list starts below: $ENTRY_PATH" 1>&2
cat "$TMP_MANIFEST_LIST" 1>&2
echo "$0: debug[5] file manifest list ends above: $ENTRY_PATH" 1>&2
echo "$0: debug[5] find files list starts below: $ENTRY_PATH" 1>&2
cat "$TMP_FILE_LIST" 1>&2
echo "$0: debug[5] find files list ends above: $ENTRY_PATH" 1>&2
fi
if cmp -s "$TMP_MANIFEST_LIST" "$TMP_FILE_LIST"; then if cmp -s "$TMP_MANIFEST_LIST" "$TMP_FILE_LIST"; then
if [[ $V_FLAG -ge 1 ]]; then if [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: file list marches manifest for: $ENTRY_PATH" 1>&2 echo "$0: debug[1]: file list marches manifest for: $ENTRY_PATH" 1>&2
+4 -4
View File
@@ -84,7 +84,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
# set variables referenced in the usage message # set variables referenced in the usage message
# #
export VERSION="1.3.3 2024-03-26" export VERSION="1.3.4 2024-03-27"
NAME=$(basename "$0") NAME=$(basename "$0")
export NAME export NAME
export V_FLAG=0 export V_FLAG=0
@@ -794,10 +794,10 @@ fi
# sort the manifest list # sort the manifest list
# #
LC_ALL=C sort -d -u "$TMP_MANIFEST_LIST" -o "$TMP_MANIFEST_LIST" LC_ALL=C sort -d "$TMP_MANIFEST_LIST" -o "$TMP_MANIFEST_LIST"
status="$?" status="$?"
if [[ $status -ne 0 ]]; then if [[ $status -ne 0 ]]; then
echo "$0: ERROR: LC_ALL=C sort -d -u $TMP_MANIFEST_LIST -o $TMP_MANIFEST_LIST failed, error: $status" 1>&2 echo "$0: ERROR: LC_ALL=C sort -d $TMP_MANIFEST_LIST -o $TMP_MANIFEST_LIST failed, error: $status" 1>&2
exit 1 exit 1
fi fi
@@ -862,7 +862,7 @@ if [[ -z $NOOP ]]; then
# output XML for each file in the manifest, in sorted filepath order # output XML for each file in the manifest, in sorted filepath order
# #
LC_ALL=C sort -d -f -u -t / "$TMP_MANIFEST_LIST" | while read -r FILE_PATH; do LC_ALL=C sort -d -f -t / "$TMP_MANIFEST_LIST" | while read -r FILE_PATH; do
LASTMOD=$(output_modtime "$FILE_PATH") LASTMOD=$(output_modtime "$FILE_PATH")
export LASTMOD export LASTMOD
echo '<url>' echo '<url>'
+3 -3
View File
@@ -101,7 +101,7 @@ shopt -s globstar # enable '**' to match all files and zero or more directories
# set variables referenced in the usage message # set variables referenced in the usage message
# #
export VERSION="1.2.3 2024-03-26" export VERSION="1.2.4 2024-03-27"
NAME=$(basename "$0") NAME=$(basename "$0")
export NAME export NAME
export V_FLAG=0 export V_FLAG=0
@@ -528,11 +528,11 @@ if [[ -z $NOOP ]]; then
echo echo
echo '## Primary files' echo '## Primary files'
echo echo
grep -E '^[0-9][0-9]{0,8} ' "$TMP_MANIFEST" | LC_ALL=C sort -u -k 1n -k 3.2d | sed -e 's/^[0-9][0-9]* //' grep -E '^[0-9][0-9]{0,8} ' "$TMP_MANIFEST" | LC_ALL=C sort -k 1n -k 3.2d | sed -e 's/^[0-9][0-9]* //'
echo echo
echo '## Secondary files' echo '## Secondary files'
echo echo
grep -E '^[1-9][0-9]{9,} ' "$TMP_MANIFEST" | LC_ALL=C sort -u -k 1n -k 3.2d | sed -e 's/^[0-9][0-9]* //' grep -E '^[1-9][0-9]{9,} ' "$TMP_MANIFEST" | LC_ALL=C sort -k 1n -k 3.2d | sed -e 's/^[0-9][0-9]* //'
} >> "$TMP_FILE" } >> "$TMP_FILE"
elif [[ $V_FLAG -ge 3 ]]; then elif [[ $V_FLAG -ge 3 ]]; then
+3 -3
View File
@@ -83,7 +83,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
# set variables referenced in the usage message # set variables referenced in the usage message
# #
export VERSION="1.1.2 2024-03-26" export VERSION="1.1.3 2024-03-27"
NAME=$(basename "$0") NAME=$(basename "$0")
export NAME export NAME
export V_FLAG=0 export V_FLAG=0
@@ -677,10 +677,10 @@ if [[ -z $NOOP ]]; then
# sort the manifest list # sort the manifest list
# #
LC_ALL=C sort -d -u "$TMP_MANIFEST_LIST" -o "$TMP_MANIFEST_LIST" LC_ALL=C sort -d "$TMP_MANIFEST_LIST" -o "$TMP_MANIFEST_LIST"
status="$?" status="$?"
if [[ $status -ne 0 ]]; then if [[ $status -ne 0 ]]; then
echo "$0: ERROR: LC_ALL=C sort -d -u $TMP_MANIFEST_LIST -o $TMP_MANIFEST_LIST failed, error: $status" 1>&2 echo "$0: ERROR: LC_ALL=C sort -d $TMP_MANIFEST_LIST -o $TMP_MANIFEST_LIST failed, error: $status" 1>&2
exit 1 exit 1
fi fi
+4 -4
View File
@@ -83,7 +83,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
# set variables referenced in the usage message # set variables referenced in the usage message
# #
export VERSION="1.3.2 2024-03-26" export VERSION="1.3.3 2024-03-27"
NAME=$(basename "$0") NAME=$(basename "$0")
export NAME export NAME
export V_FLAG=0 export V_FLAG=0
@@ -626,10 +626,10 @@ if [[ -z $NOOP ]]; then
fi fi
echo "$IOCCC_CSS" >> "$TMP_MANIFEST_LIST" echo "$IOCCC_CSS" >> "$TMP_MANIFEST_LIST"
echo "$VAR_MK" >> "$TMP_MANIFEST_LIST" echo "$VAR_MK" >> "$TMP_MANIFEST_LIST"
LC_ALL=C sort -d -u "$TMP_MANIFEST_LIST" -o "$TMP_MANIFEST_LIST" LC_ALL=C sort -d "$TMP_MANIFEST_LIST" -o "$TMP_MANIFEST_LIST"
status="$?" status="$?"
if [[ $status -ne 0 ]]; then if [[ $status -ne 0 ]]; then
echo "$0: ERROR: LC_ALL=C sort -d -u $TMP_MANIFEST_LIST -o $TMP_MANIFEST_LIST failed, error: $status" 1>&2 echo "$0: ERROR: LC_ALL=C sort -d $TMP_MANIFEST_LIST -o $TMP_MANIFEST_LIST failed, error: $status" 1>&2
exit 1 exit 1
fi fi
elif [[ $V_FLAG -ge 3 ]]; then elif [[ $V_FLAG -ge 3 ]]; then
@@ -739,7 +739,7 @@ if [[ -z $REBUILD_TARBALL ]]; then
fi fi
fi fi
if [[ -z $REBUILD_TARBALL ]]; then if [[ -z $REBUILD_TARBALL ]]; then
LC_ALL=C sort -d -u "$TMP_TARBALL_LIST" -o "$TMP_TARBALL_LIST" LC_ALL=C sort -d "$TMP_TARBALL_LIST" -o "$TMP_TARBALL_LIST"
status="$?" status="$?"
if [[ $status -ne 0 ]]; then if [[ $status -ne 0 ]]; then
REBUILD_TARBALL="true" REBUILD_TARBALL="true"
+3 -3
View File
@@ -83,7 +83,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
# set variables referenced in the usage message # set variables referenced in the usage message
# #
export VERSION="1.1.2 2024-03-26" export VERSION="1.1.3 2024-03-27"
NAME=$(basename "$0") NAME=$(basename "$0")
export NAME export NAME
export V_FLAG=0 export V_FLAG=0
@@ -650,10 +650,10 @@ if [[ -z $NOOP ]]; then
# sort the manifest list # sort the manifest list
# #
LC_ALL=C sort -d -u "$TMP_MANIFEST_LIST" -o "$TMP_MANIFEST_LIST" LC_ALL=C sort -d "$TMP_MANIFEST_LIST" -o "$TMP_MANIFEST_LIST"
status="$?" status="$?"
if [[ $status -ne 0 ]]; then if [[ $status -ne 0 ]]; then
echo "$0: ERROR: LC_ALL=C sort -d -u $TMP_MANIFEST_LIST -o $TMP_MANIFEST_LIST failed, error: $status" 1>&2 echo "$0: ERROR: LC_ALL=C sort -d $TMP_MANIFEST_LIST -o $TMP_MANIFEST_LIST failed, error: $status" 1>&2
exit 1 exit 1
fi fi