add bin/add-dir.sh skeleton for further development

We have added `bin/add-dir.sh` which is just a skeleton
script.  For now, most of what is useful are the top level
comments describing what the command will and will NOT do.
These comments are work in progress and will be updated.

Updated `bin/README.md` to reflect these changes.

Changed usage introduction text to `bin/README.md`.

Made a minor comment change to `bin/add-dir.sh`.

The `bin/new-year.sh` toll will create the YYYY directory if needed.

Added `template/` directory for Makefile templates.

The `bin/new-year.sh` tool will create `YYYY/Makefile` from
the `template/Makefile.year` if needed.

The `YYYY/.year` and `YYYY/.filelist` will be created
for the new IOCCC year.

Change `bin/new-year.sh` VERSION from "1.1 2024-07-21"
to "1.2 2024-07-22".

Added a brief description of `bin/add-dir.sh` to `bin/README.md`
and updated `bin/new-year.sh` entry.

Added `make genpath_top` rule that just updates `.top`.
The existing `make genpath` also runs `make genpath_top`.

The `YYYY/README.md` will be created from a template
for the new IOCCC year.

Flag as error if `YYYY/README.md`, or `YYYY/YYYY.tar.bz2` is
missing in `bin/gen-years.sh`.

Warn if `YYYY/README.md`, or `YYYY/YYYY.tar.bz2` is an empty file
in `bin/gen-years.sh`.

Changed `bin/gen-years.sh` VERSION from "1.3.4 2024-07-13"
to "1.3.5 2024-07-23".

Performed `make www` to accomplish the above and to test under macOS.
This commit is contained in:
Landon Curt Noll committed 2024-07-23 12:55:07 -07:00
1 parent 332255fd40
commit 30334f9716
9 files changed
+1378 -60

No files matched your search

+27 -1
View File
@@ -85,7 +85,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.4 2024-07-13"
export VERSION="1.3.5 2024-07-22"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -663,6 +663,19 @@ for YYYY in $("$TAC_TOOL" "$TOP_FILE"); do
continue
fi
# Verify $YYYY/$YYYY.tar.bz2
#
if [[ ! -e $YYYY/$YYYY.tar.bz2 ]]; then
echo "$0: ERROR: compressed tarball for YYYY: $YYYY is missing: $YYYY/$YYYY.tar.bz2" 1>&2
EXIT_CODE="6" # exit 6
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
continue
fi
if [[ ! -s $YYYY/$YYYY.tar.bz2 ]]; then
echo "$0: Warning: compressed tarball for YYYY: $YYYY is empty: $YYYY/$YYYY.tar.bz2" 1>&2
echo "$0: notice: continuing the processing of YYYY: $YYYY" 1>&2
fi
# write leading markdown for this IOCCC year
#
{
@@ -795,6 +808,19 @@ for YYYY in $("$TAC_TOOL" "$TOP_FILE"); do
continue
fi
# Verify $YYYY_DIR/README.md
#
if [[ ! -e $YYYY_DIR/README.md ]]; then
echo "$0: ERROR: README.md for YYYY: $YYYY is missing: $YYYY_DIR/README.md" 1>&2
EXIT_CODE="7" # exit 7
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
continue
fi
if [[ ! -s $YYYY_DIR/README.md ]]; then
echo "$0: Warning: README.md for YYYY/dir: $YYYY_DIR/README.md is empty: $YYYY_DIR/README.md" 1>&2
echo "$0: notice: continuing the processing of YYYY: $YYYY" 1>&2
fi
# output markdown for this entry
#
echo "* <div id=\"${YEAR_DIR}_${ENTRY_DIR}\"><a class=\"normal\" href=\"$YYYY_DIR/index.html\">$YYYY_DIR</a> - $AWARD</div>"