corrected use of REPO_URL shell variable, added REPO_TOP_URL

The shell variable `$REPO_URL` was often set to
`https://github.com/ioccc-src/temp-test-ioccc/blob/master` which was
not consistent with the variable name.  In some cases the `$REPO_URL`
was used as the top level path for a git repo (w/o the `/blob/master`),
and in most cases was used as a GitHub URL path under which files may
be found (with `/blob/master`).

We change the shell variable `$REPO_URL` to be `$REPO_TOP_URL` and
use the value `https://github.com/ioccc-src/temp-test-ioccc`, w/o
the `/blob/master`, and adjust places where the GitHub URL path (with
`/blob/master`) is needed.  A new shell variable `$REPO_URL` will contain
the `https://github.com/ioccc-src/temp-test-ioccc/blob/master` (with
`/blob/master`).

In tools that use `-u` the option was changed from `repo_url` to
`repo_top_url`.  The `-u repo_top_url` will set the
 `$REPO_TOP_URL` shell variable (w/o the `/blob/master`), and then set
 the variable `$REPO_URL` as `$REPO_TOP_URL//blob/master`.

Fixed a shellcheck issue with `bin/tar-entry.sh`.

Corrected name of shell variable `$AUTHOR_GUTHUB_USERNAME` to be
`$AUTHOR_GITHUB_USERNAME`.

The substitution symbol `%%REPO_URL%%` has used in markdown
files remains as before.  That is, REPO_URL is set according
to the shell variable `$REPO_URL` which includes `/blob/master`).

Fixed broken `author_handle` links in `authors.html`.

NOTE: Except for correcting links `authors.html` as noted above,
no HTML content was modified by these changes.

Changed `bin/add-dir.sh`VERSION from "1.1 2024-07-23"
to "1.1.1 2024-07-28".

Changed `bin/all-run.sh`VERSION from "1.3.4 2024-05-24"
to "1.3.5 2024-07-28".

Changed `bin/all-years.sh`VERSION from "1.0.3 2024-04-13"
to "1.0.4 2024-07-28".

Changed `bin/chk-entry.sh`VERSION from "1.1.8 2024-07-06"
to "1.1.9 2024-07-28".

Changed `bin/cvt-submission.sh`VERSION from "1.0 2024-07-22"
to "1.0.1 2024-07-28".

Changed `bin/gen-authors.sh`VERSION from "1.10.4 2024-07-13"
to "1.10.5 2024-07-28".

Changed `bin/gen-location.sh`VERSION from "1.4.3 2024-07-13"
to "1.4.4 2024-07-28".

Changed `bin/gen-other-html.sh`VERSION from "1.2.4 2024-05-31"
to "1.2.5 2024-07-28".

Changed `bin/gen-sitemap.sh`VERSION from "1.3.11 2024-07-22"
to "1.3.12 2024-07-28".

Changed `bin/gen-status.sh`VERSION from "1.5.6 2024-07-22"
to "1.5.7 2024-07-28".

Changed `bin/gen-top-html.sh`VERSION from "1.4.6 2024-05-24"
to "1.4.7 2024-07-28".

Changed `bin/gen-year-index.sh`VERSION from "1.1 2024-04-16"
to "1.1.1 2024-07-28".

Changed `bin/gen-years.sh`VERSION from "1.3.5 2024-07-22"
to "1.3.6 2024-07-28".

Changed `bin/md2html.sh`VERSION from "1.5.3 2024-07-22"
to "1.5.4 2024-07-28".

Changed `bin/new-year.sh`VERSION from "1.3.1 2024-07-23"
to "1.3.2 2024-07-28".

Changed `bin/output-index-author.sh`VERSION from "1.7.1 2024-04-28"
to "1.7.2 2024-07-28".

Changed `bin/output-index-inventory.sh`VERSION from "1.4.1 2024-04-28"
to "1.4.2 2024-07-28".

Changed `bin/output-year-index.sh`VERSION from "1.4.2 2024-07-07"
to "1.4.3 2024-07-28".

Changed `bin/pandoc-wrapper.sh`VERSION from "1.7 2024-06-22"
to "1.7.1 2024-07-28".

Changed `bin/quick-readme2index.sh`VERSION from "1.1.5 2024-05-19"
to "1.1.6 2024-07-28".

Changed `bin/readme2index.sh`VERSION from "1.2.5 2024-05-19"
to "1.2.6 2024-07-28".

Changed `bin/sort.gitignore.sh`VERSION from "1.1.7 2024-04-28"
to "1.1.8 2024-07-28".

Changed `bin/status2html.sh`VERSION from "1.4.1 2024-04-28"
to "1.4.2 2024-07-28".

Changed `bin/subst.default.sh`VERSION from "1.3 2024-04-20"
to "1.3.1 2024-07-28".

Changed `bin/subst.entry-index.sh`VERSION from "1.3.3 2024-04-13"
to "1.3.4 2024-07-28".

Changed `bin/subst.year-index.sh`VERSION from "1.1.3 2024-04-13"
to "1.1.4 2024-07-28".

Changed `bin/tar-entry.sh`VERSION from "1.3.8 2024-07-23"
to "1.3.9 2024-07-28".

Changed `bin/tar-year.sh`VERSION from "1.2.6 2024-07-23"
to "1.2.7 2024-07-28".

Changed `bin/untar-entry.sh`VERSION from "1.0.2 2024-04-13"
to "1.0.3 2024-07-28".

Changed `bin/untar-year.sh`VERSION from "1.0.2 2024-04-14"
to "1.0.3 2024-07-28".

Performed `make www` to accomplish the above and to test under macOS.
This commit is contained in:
Landon Curt Noll committed 2024-07-28 18:58:00 -07:00
1 parent 8eb8003d94
commit b01a23d735
32 files changed
+617 -493

No files matched your search

+9 -6
View File
@@ -88,7 +88,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.1 2024-07-23"
export VERSION="1.1.1 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -104,7 +104,9 @@ if [[ $status -eq 0 ]]; then
TOPDIR=$("$GIT_TOOL" rev-parse --show-toplevel)
fi
export TOPDIR
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
#
export NOOP=
export DO_NOT_PROCESS=
@@ -193,21 +195,21 @@ export ENTRY_PATH="$1"
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -340,6 +342,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
+16 -13
View File
@@ -17,7 +17,7 @@
#
# Each tool run with command line of the form:
#
# tool [any -D, -t tagline, -T md2html.sh, -p tool, -u repo_url, -w site_url] [more_options] YYYY/dir
# tool [any -D, -t tagline, -T md2html.sh, -p tool, -u repo_top_url, -w site_url] [more_options] YYYY/dir
#
# For example:
#
@@ -113,7 +113,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-05-24"
export VERSION="1.3.5 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -133,7 +133,9 @@ export DOCROOT_SLASH="../../"
export TAGLINE="unspecified"
export MD2HTML_SH="bin/md2html.sh"
export PANDOC_WRAPPER="bin/pandoc-wrapper.sh"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
#
export NOOP=
@@ -148,7 +150,7 @@ declare -ag TOOL_OPTION
# usage
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_url] [-w site_url]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_top_url] [-w site_url]
tool [more_options]
-h print help message and exit
@@ -170,8 +172,8 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool run 'pandoc wrapper tool' (not pandoc path) during HTML phase number 21 (def: use $PANDOC_WRAPPER)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
NOTE: The '-u repo_url' is passed as leading options on tool command lines.
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
NOTE: The '-u repo_top_url' is passed as leading options on tool command lines.
-w site_url Base URL of the website (def: $SITE_URL)
NOTE: The '-w site_url' is passed as leading options on tool command lines.
@@ -179,7 +181,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
tool the tool to run over all entries
[more_options] additional tool command line options to use before the YYYY/dir argument
NOTE: Any '-D docroot/', '-t tagline', '-T md2html.sh', '-p tool', '-u repo_url', '-w site_url'
NOTE: Any '-D docroot/', '-t tagline', '-T md2html.sh', '-p tool', '-u repo_top_url', '-w site_url'
are passed to the 'tool' at the beginning of the command line, and
before any optional 'more_options' and before the final YYYY/dir argument.
@@ -255,9 +257,9 @@ while getopts :hv:Vd:D:nNt:T:p:u:w: flag; do
TOOL_OPTION+=("-p")
TOOL_OPTION+=("$PANDOC_WRAPPER")
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
TOOL_OPTION+=("-u")
TOOL_OPTION+=("$REPO_URL")
TOOL_OPTION+=("$REPO_TOP_URL")
;;
w) SITE_URL="$OPTARG"
TOOL_OPTION+=("-w")
@@ -310,21 +312,21 @@ esac
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -415,6 +417,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
+16 -13
View File
@@ -16,7 +16,7 @@
#
# Each tool run with command line of the form:
#
# tool [any -D, -t tagline, -T md2html.sh, -p tool, -u repo_url, -w site_url] [more_options] YYYY
# tool [any -D, -t tagline, -T md2html.sh, -p tool, -u repo_top_url, -w site_url] [more_options] YYYY
#
# For example:
#
@@ -111,7 +111,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.0.3 2024-04-13"
export VERSION="1.0.4 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -131,7 +131,9 @@ export DOCROOT_SLASH="../../"
export TAGLINE="unspecified"
export MD2HTML_SH="bin/md2html.sh"
export PANDOC_WRAPPER="bin/pandoc-wrapper.sh"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
#
export NOOP=
@@ -146,7 +148,7 @@ declare -ag TOOL_OPTION
# usage
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_url] [-w site_url]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_top_url] [-w site_url]
tool [more_options]
-h print help message and exit
@@ -169,8 +171,8 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool run 'pandoc wrapper tool' (not pandoc path) during HTML phase number 21 (def: use $PANDOC_WRAPPER)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
NOTE: The '-u repo_url' is passed as leading options on tool command lines.
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
NOTE: The '-u repo_top_url' is passed as leading options on tool command lines.
-w site_url Base URL of the website (def: $SITE_URL)
NOTE: The '-w site_url' is passed as leading options on tool command lines.
@@ -178,7 +180,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
tool the tool to run over all entries
[more_options] additional tool command line options to use before the YYYY/dir argument
NOTE: Any '-t tagline', '-T md2html.sh', '-p tool', '-u repo_url', '-w site_url'
NOTE: Any '-t tagline', '-T md2html.sh', '-p tool', '-u repo_top_url', '-w site_url'
are passed to the 'tool' at the beginning of the command line, and
before any optional 'more_options' and before the final YYYY/dir argument.
@@ -254,9 +256,9 @@ while getopts :hv:Vd:D:nNt:T:p:u:w: flag; do
TOOL_OPTION+=("-p")
TOOL_OPTION+=("$PANDOC_WRAPPER")
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
TOOL_OPTION+=("-u")
TOOL_OPTION+=("$REPO_URL")
TOOL_OPTION+=("$REPO_TOP_URL")
;;
w) SITE_URL="$OPTARG"
TOOL_OPTION+=("-w")
@@ -309,21 +311,21 @@ esac
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -414,6 +416,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
+11 -8
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.1.8 2024-07-06"
export VERSION="1.1.9 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -101,12 +101,14 @@ if [[ $status -eq 0 ]]; then
TOPDIR=$("$GIT_TOOL" rev-parse --show-toplevel)
fi
export TOPDIR
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-p tool] [-u repo_url] [-w site_url]
[-p tool] [-u repo_top_url] [-w site_url]
YYYY/dir
-h print help message and exit
@@ -121,7 +123,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool This option is ignored
-u repo_url This option is ignored
-u repo_top_url This option is ignored
-w site_url This option is ignored
YYYY/dir path from topdir to entry directory: must contain the files: README.md, .path and .entry.json
@@ -206,21 +208,21 @@ export ENTRY_PATH="$1"
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -357,6 +359,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
+9 -6
View File
@@ -102,7 +102,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.0 2024-07-22"
export VERSION="1.0.1 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -118,7 +118,9 @@ if [[ $status -eq 0 ]]; then
TOPDIR=$("$GIT_TOOL" rev-parse --show-toplevel)
fi
export TOPDIR
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
#
export NOOP=
export DO_NOT_PROCESS=
@@ -208,21 +210,21 @@ export ENTRY_PATH="$1"
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -337,6 +339,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
+19 -16
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.10.4 2024-07-13"
export VERSION="1.10.5 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -105,7 +105,9 @@ export DOCROOT_SLASH="./"
export TAGLINE="bin/$NAME"
export MD2HTML_SH="bin/md2html.sh"
export PANDOC_WRAPPER="bin/pandoc-wrapper.sh"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
#
export NOOP=
@@ -151,7 +153,7 @@ declare -ag TOOL_OPTION
# usage
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_url]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_top_url]
-h print help message and exit
-v level set verbosity level (def level: 0)
@@ -174,14 +176,14 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool run 'pandoc wrapper tool' (not pandoc path) during HTML phase number 21 (def: use $PANDOC_WRAPPER)
NOTE: The '-p tool' is passed as leading options on tool command lines.
-u repo_url Base level URL of target git repo (def: $REPO_URL)
NOTE: The '-u repo_url' is passed as leading options on tool command lines.
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
NOTE: The '-u repo_top_url' is passed as leading options on tool command lines.
-w site_url Base URL of the website (def: $SITE_URL)
NOTE: The '-w site_url' is passed as leading options on tool command lines.
NOTE: The '-v level' is passed as initial command line options to the 'markdown to html tool' (md2html.sh).
The 'tagline' is passed as '-t tagline' to the 'markdown to html tool' (md2html.sh), after the '-v level'.
Any '-T md2html.sh', '-p tool', '-P pandoc_opts', '-u repo_url', '-U top_url'
Any '-T md2html.sh', '-p tool', '-P pandoc_opts', '-u repo_top_url', '-U top_url'
are passed to the 'markdown to html tool' (md2html.sh), and will be before any command line arguments.
Exit codes:
@@ -804,9 +806,9 @@ while getopts :hv:Vd:D:nNt:T:p:u:w: flag; do
TOOL_OPTION+=("-p")
TOOL_OPTION+=("$PANDOC_WRAPPER")
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
TOOL_OPTION+=("-u")
TOOL_OPTION+=("$REPO_URL")
TOOL_OPTION+=("$REPO_TOP_URL")
;;
w) SITE_URL="$OPTARG"
TOOL_OPTION+=("-w")
@@ -871,21 +873,21 @@ TOOL_OPTION+=("$DOCROOT_SLASH")
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -978,6 +980,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
@@ -1239,8 +1242,8 @@ EOF
# NOTE: AUTHOR_GITHUB will be empty if there is no GitHub handle
AUTHOR_GITHUB=$(output_github "$filename")
export AUTHOR_GITHUB
AUTHOR_GUTHUB_USERNAME=${AUTHOR_GITHUB#@}
export AUTHOR_GUTHUB_USERNAME
AUTHOR_GITHUB_USERNAME=${AUTHOR_GITHUB#@}
export AUTHOR_GITHUB_USERNAME
# output author information
#
@@ -1272,10 +1275,10 @@ EOF
fi
if [[ -n $AUTHOR_GITHUB ]]; then
echo "<br>"
echo "GitHub: <a class=\"normal\" href=\"https://github.com/$AUTHOR_GUTHUB_USERNAME\">$AUTHOR_GITHUB</a>"
echo "GitHub: <a class=\"normal\" href=\"https://github.com/$AUTHOR_GITHUB_USERNAME\">$AUTHOR_GITHUB</a>"
fi
echo "<br>"
echo "author_handle: <a class=\"normal\" href=\"$%%REPO_URL%%/author/$AUTHOR_HANDLE.jsonE\">$AUTHOR_HANDLE</a>"
echo "author_handle: <a class=\"normal\" href=\"$%%REPO_URL%%/author/$AUTHOR_HANDLE.json\">$AUTHOR_HANDLE</a>"
echo "<p></p>"
# output YYYY/dir set made by this author
+15 -12
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
#
export VERSION="1.4.3 2024-07-13"
export VERSION="1.4.4 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -104,7 +104,9 @@ export DOCROOT_SLASH="./"
export TAGLINE="bin/$NAME"
export MD2HTML_SH="bin/md2html.sh"
export PANDOC_WRAPPER="bin/pandoc-wrapper.sh"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
#
export NOOP=
@@ -119,7 +121,7 @@ declare -ag TOOL_OPTION
# usage
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_url]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_top_url]
-h print help message and exit
-v level set verbosity level (def level: 0)
@@ -142,14 +144,14 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool run 'pandoc wrapper tool' (not pandoc path) during HTML phase number 21 (def: use $PANDOC_WRAPPER)
NOTE: The '-p tool' is passed as leading options on tool command lines.
-u repo_url Base level URL of target git repo (def: $REPO_URL)
NOTE: The '-u repo_url' is passed as leading options on tool command lines.
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
NOTE: The '-u repo_top_url' is passed as leading options on tool command lines.
-w site_url Base URL of the website (def: $SITE_URL)
NOTE: The '-w site_url' is passed as leading options on tool command lines.
NOTE: The '-v level' is passed as initial command line options to the 'markdown to html tool' (md2html.sh).
The 'tagline' is passed as '-t tagline' to the 'markdown to html tool' (md2html.sh), after the '-v level'.
Any '-T md2html.sh', '-p tool', '-P pandoc_opts', '-u repo_url', '-U top_url'
Any '-T md2html.sh', '-p tool', '-P pandoc_opts', '-u repo_top_url', '-U top_url'
are passed to the 'markdown to html tool' (md2html.sh), and will be before any command line arguments.
Exit codes:
@@ -224,9 +226,9 @@ while getopts :hv:Vd:D:nNt:T:p:u:w: flag; do
TOOL_OPTION+=("-p")
TOOL_OPTION+=("$PANDOC_WRAPPER")
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
TOOL_OPTION+=("-u")
TOOL_OPTION+=("$REPO_URL")
TOOL_OPTION+=("$REPO_TOP_URL")
;;
w) SITE_URL="$OPTARG"
TOOL_OPTION+=("-w")
@@ -291,21 +293,21 @@ TOOL_OPTION+=("$DOCROOT_SLASH")
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -398,6 +400,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
+17 -12
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
#
export VERSION="1.2.4 2024-05-31"
export VERSION="1.2.5 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -104,7 +104,9 @@ export DOCROOT_SLASH="../../"
export TAGLINE="bin/$NAME"
export MD2HTML_SH="bin/md2html.sh"
export PANDOC_WRAPPER="bin/pandoc-wrapper.sh"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
#
export NOOP=
@@ -119,7 +121,7 @@ declare -ag TOOL_OPTION
# usage
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_url] [-w site_url]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_top_url] [-w site_url]
-h print help message and exit
-v level set verbosity level (def level: 0)
@@ -140,13 +142,13 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool run 'pandoc wrapper tool' (not pandoc path) during HTML phase number 21 (def: use $PANDOC_WRAPPER)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
NOTE: The '-u repo_url' is passed as leading options on tool command lines.
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
NOTE: The '-u repo_top_url' is passed as leading options on tool command lines.
-w site_url Base URL of the website (def: $SITE_URL)
NOTE: The '-w site_url' is passed as leading options on tool command lines.
NOTE: Any '-D docroot/', '-t tagline', '-T md2html.sh', '-p tool', '-u repo_url', '-w site_url'
NOTE: Any '-D docroot/', '-t tagline', '-T md2html.sh', '-p tool', '-u repo_top_url', '-w site_url'
are passed to the 'tool' at the beginning of the command line, and
before any optional 'more_options' and before the final YYYY/dir argument.
@@ -221,7 +223,9 @@ while getopts :hv:Vd:D:nNt:T:p:u:w: flag; do
TOOL_OPTION+=("-p")
TOOL_OPTION+=("$PANDOC_WRAPPER")
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
;;
w) SITE_URL="$OPTARG"
;;
@@ -259,21 +263,21 @@ fi
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -340,7 +344,7 @@ fi
TOOL_OPTION+=("-t")
TOOL_OPTION+=("$TAGLINE")
TOOL_OPTION+=("-u")
TOOL_OPTION+=("$REPO_URL")
TOOL_OPTION+=("$REPO_TOP_URL")
TOOL_OPTION+=("-w")
TOOL_OPTION+=("$SITE_URL")
@@ -358,6 +362,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
+14 -10
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
#
export VERSION="1.3.11 2024-07-22"
export VERSION="1.3.12 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -100,7 +100,9 @@ if [[ $status -eq 0 ]]; then
TOPDIR=$("$GIT_TOOL" rev-parse --show-toplevel)
fi
export TOPDIR
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
export CAP_W_FLAG_FOUND=
export MODTIME_METHOD=""
@@ -195,7 +197,7 @@ function output_modtime
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
[-u repo_url] [-w site_url] [-W]
[-u repo_top_url] [-w site_url] [-W]
-h print help message and exit
-v level set verbosity level (def level: 0)
@@ -206,8 +208,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
-n go thru the actions, but do not update any files (def: do the action)
-N do not process file, just parse arguments and ignore the file (def: process the file)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
NOTE: The '-u repo_url' is passed as leading options on tool command lines.
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
-w site_url Base URL of the website (def: $SITE_URL)
NOTE: The '-w site_url' is passed as leading options on tool command lines.
@@ -253,7 +254,9 @@ while getopts :hv:Vd:nNu:w:W flag; do
;;
N) DO_NOT_PROCESS="-N"
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
;;
w) SITE_URL="$OPTARG"
;;
@@ -296,21 +299,21 @@ fi
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -482,6 +485,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
+15 -12
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
#
export VERSION="1.5.6 2024-07-22"
export VERSION="1.5.7 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -103,7 +103,9 @@ export TOPDIR
export DOCROOT_SLASH="./"
export TAGLINE="bin/$NAME"
export MD2HTML_SH="bin/md2html.sh"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
JPARSE_TOOL=$(type -P jparse)
export JPARSE_TOOL
@@ -334,7 +336,7 @@ function output_status_json
# usage
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
[-t tagline] [-T md2html.sh] [-u repo_url]
[-t tagline] [-T md2html.sh] [-u repo_top_url]
[p | pending | o | open | j | judging | c | closed]
-h print help message and exit
@@ -355,8 +357,8 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
NOTE: 'tagline' may be enclosed within, but may NOT contain an internal single-quote, or double-quote.
-T md2html.sh run 'markdown to html tool' to convert markdown into HTML (def: $MD2HTML_SH)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
NOTE: The '-u repo_url' is passed as leading options on tool command lines.
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
NOTE: The '-u repo_top_url' is passed as leading options on tool command lines.
-w site_url Base URL of the website (def: $SITE_URL)
NOTE: The '-w site_url' is passed as leading options on tool command lines.
@@ -368,7 +370,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
NOTE: The '-v level' is passed as initial command line options to the 'markdown to html tool' (md2html.sh).
The 'tagline' is passed as '-t tagline' to the 'markdown to html tool' (md2html.sh), after the '-v level'.
Any '-T md2html.sh', '-p tool', '-P pandoc_opts', '-u repo_url', '-U top_url'
Any '-T md2html.sh', '-p tool', '-P pandoc_opts', '-u repo_top_url', '-U top_url'
are passed to the 'markdown to html tool' (md2html.sh), and will be before any command line arguments.
Exit codes:
@@ -438,9 +440,9 @@ while getopts :hv:Vd:D:nNt:T:u:w: flag; do
TOOL_OPTION+=("-T")
TOOL_OPTION+=("$MD2HTML_SH")
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
TOOL_OPTION+=("-u")
TOOL_OPTION+=("$REPO_URL")
TOOL_OPTION+=("$REPO_TOP_URL")
;;
w) SITE_URL="$OPTARG"
TOOL_OPTION+=("-w")
@@ -523,21 +525,21 @@ TOOL_OPTION+=("$DOCROOT_SLASH")
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -751,6 +753,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: JPARSE_TOOL=$JPARSE_TOOL" 1>&2
+15 -12
View File
@@ -93,7 +93,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.4.6 2024-05-24"
export VERSION="1.4.7 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -113,7 +113,9 @@ export DOCROOT_SLASH="./"
export TAGLINE="bin/$NAME"
export MD2HTML_SH="bin/md2html.sh"
export PANDOC_WRAPPER="bin/pandoc-wrapper.sh"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
#
unset TOP_MD_SET
@@ -152,7 +154,7 @@ declare -ag TOOL_OPTION
# usage
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_url] [file...]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_top_url] [file...]
-h print help message and exit
-v level set verbosity level (def level: 0)
@@ -175,14 +177,14 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool run 'pandoc wrapper tool' (not pandoc path) during HTML phase number 21 (def: use $PANDOC_WRAPPER)
NOTE: The '-p tool' is passed as leading options on tool command lines.
-u repo_url Base level URL of target git repo (def: $REPO_URL)
NOTE: The '-u repo_url' is passed as leading options on tool command lines.
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
NOTE: The '-u repo_top_url' is passed as leading options on tool command lines.
-w site_url Base URL of the website (def: $SITE_URL)
NOTE: The '-w site_url' is passed as leading options on tool command lines.
NOTE: The '-v level' is passed as initial command line options to the 'markdown to html tool' (md2html.sh).
The 'tagline' is passed as '-t tagline' to the 'markdown to html tool' (md2html.sh), after the '-v level'.
Any '-T md2html.sh', '-p tool', '-P pandoc_opts', '-u repo_url', '-U top_url'
Any '-T md2html.sh', '-p tool', '-P pandoc_opts', '-u repo_top_url', '-U top_url'
are passed to the 'markdown to html tool' (md2html.sh), and will be before any command line arguments.
Exit codes:
@@ -257,9 +259,9 @@ while getopts :hv:Vd:D:nNt:T:p:u:w: flag; do
TOOL_OPTION+=("-p")
TOOL_OPTION+=("$PANDOC_WRAPPER")
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
TOOL_OPTION+=("-u")
TOOL_OPTION+=("$REPO_URL")
TOOL_OPTION+=("$REPO_TOP_URL")
;;
w) SITE_URL="$OPTARG"
TOOL_OPTION+=("-w")
@@ -334,21 +336,21 @@ TOOL_OPTION+=("$DOCROOT_SLASH")
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -436,6 +438,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
if (( ${#TOP_MD_SELECT_SET[@]} )); then
+15 -10
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.1 2024-04-16"
export VERSION="1.1.1 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -104,7 +104,9 @@ export TOPDIR
export DOCROOT_SLASH="../../"
export TAGLINE="bin/$NAME"
export MD2HTML_SH="bin/md2html.sh"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
# clear options we will add to tools
@@ -115,7 +117,7 @@ declare -ag TOOL_OPTION
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
[-t tagline] [-T md2html.sh] [-u repo_url] [-w site_url]
[-t tagline] [-T md2html.sh] [-u repo_top_url] [-w site_url]
YYYY [more_options]
-h print help message and exit
@@ -132,8 +134,10 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
-t tagline string to write about the tool that formed the markdown content (def: $TAGLINE)
-T md2html.sh run 'markdown to html tool' to convert markdown into HTML (def: $MD2HTML_SH)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
NOTE: The '-u repo_top_url' is passed as leading options on tool command lines.
-w site_url Base URL of the website (def: $SITE_URL)
NOTE: The '-w site_url' is passed as leading options on tool command lines.
YYYY path from topdir to year directory: must contain the files: README.md, .path and .entry.json
[more_options] additional tool command line options to use before the YYYY argument
@@ -210,9 +214,9 @@ while getopts :hv:Vd:D:nNt:T:u:w: flag; do
TOOL_OPTION+=("-T")
TOOL_OPTION+=("$MD2HTML_SH")
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
TOOL_OPTION+=("-u")
TOOL_OPTION+=("$REPO_URL")
TOOL_OPTION+=("$REPO_TOP_URL")
;;
w) SITE_URL="$OPTARG"
TOOL_OPTION+=("-w")
@@ -271,21 +275,21 @@ fi
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -398,6 +402,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
for index in "${!TOOL_OPTION[@]}"; do
+15 -12
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.5 2024-07-22"
export VERSION="1.3.6 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -117,7 +117,9 @@ export DOCROOT_SLASH="./"
export TAGLINE="bin/$NAME"
export MD2HTML_SH="bin/md2html.sh"
export PANDOC_WRAPPER="bin/pandoc-wrapper.sh"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
#
export NOOP=
@@ -132,7 +134,7 @@ declare -ag TOOL_OPTION
# usage
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_url]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_top_url]
-h print help message and exit
-v level set verbosity level (def level: 0)
@@ -155,14 +157,14 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool run 'pandoc wrapper tool' (not pandoc path) during HTML phase number 21 (def: use $PANDOC_WRAPPER)
NOTE: The '-p tool' is passed as leading options on tool command lines.
-u repo_url Base level URL of target git repo (def: $REPO_URL)
NOTE: The '-u repo_url' is passed as leading options on tool command lines.
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
NOTE: The '-u repo_top_url' is passed as leading options on tool command lines.
-w site_url Base URL of the website (def: $SITE_URL)
NOTE: The '-w site_url' is passed as leading options on tool command lines.
NOTE: The '-v level' is passed as initial command line options to the 'markdown to html tool' (md2html.sh).
The 'tagline' is passed as '-t tagline' to the 'markdown to html tool' (md2html.sh), after the '-v level'.
Any '-T md2html.sh', '-p tool', '-P pandoc_opts', '-u repo_url', '-U top_url'
Any '-T md2html.sh', '-p tool', '-P pandoc_opts', '-u repo_top_url', '-U top_url'
are passed to the 'markdown to html tool' (md2html.sh), and will be before any command line arguments.
Exit codes:
@@ -351,9 +353,9 @@ while getopts :hv:Vd:D:nNt:T:p:u:w: flag; do
TOOL_OPTION+=("-p")
TOOL_OPTION+=("$PANDOC_WRAPPER")
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
TOOL_OPTION+=("-u")
TOOL_OPTION+=("$REPO_URL")
TOOL_OPTION+=("$REPO_TOP_URL")
;;
w) SITE_URL="$OPTARG"
TOOL_OPTION+=("-w")
@@ -418,21 +420,21 @@ TOOL_OPTION+=("$DOCROOT_SLASH")
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -523,6 +525,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
+3 -2
View File
@@ -10,7 +10,8 @@
#
# YYYY IOCCC year or mock
# dir name of entry's directory under YYYY containing .entry.json
# REPO_URL GitHub repo URL, e.g., https://github.com/ioccc-src/winner
# REPO_URL GitHub repo URL, e.g., https://github.com/ioccc-src/winner/blob/master/blob/master
# We append blob/master to account for how GitHub forms file URLs.
# XXX - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - XXX
# XXX - GROSS HACK - GROSS HACK - GROSS HACK - GROSS HACK - GROSS HACK - GROSS HACK - XXX
@@ -22,7 +23,7 @@ BEGIN {
# setup
#
VERSION="1.1.1 2024-04-13"
VERSION="1.1.2 2024-07-28"
found_manifest_array = 0; # 1 ==> we found the manifest ARRAY
within_manifest_array = 0; # 1 ==> found start of "manifest" : [ JSON array
begin_manifest_element = 0; # 1 ==> we have found the start of the manifest array element
+22 -14
View File
@@ -141,7 +141,7 @@ shopt -s lastpipe # run last command of a pipeline not executed in the backgroun
# set variables referenced in the usage message
#
export VERSION="1.5.3 2024-07-22"
export VERSION="1.5.4 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -165,7 +165,9 @@ fi
export TOPDIR
export DOCROOT_SLASH="./"
export PANDOC_WRAPPER="bin/pandoc-wrapper.sh"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
export URL="#"
@@ -175,7 +177,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-c md2html.cfg] [-H phase=name ..] [-t tagline]
[-b tool] [-p tool] [-a tool]
[-s token=value ..] [-S] [-o tool ..]
[-u repo_url] [-U url] [-w site_url] [-m mdtag] [-e string ..] [-E exitcode]
[-u repo_top_url] [-U url] [-w site_url] [-m mdtag] [-e string ..] [-E exitcode]
[match.md] input.md output.html
-h print help message and exit
@@ -224,11 +226,12 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-o . disable use of 'output tool' (def: do not use an 'output tool')
NOTE: -o may only be used in command_options and md2html.cfg cfg_options (getopt phases 0 and 2)
-u repo_url base level URL of target git repo (def: $REPO_URL)
NOTE: The '-u repo_url' is passed as leading options on -b tool, -a tool, and -o tool command lines.
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
NOTE: The '-u repo_top_url' is passed as leading options on -b tool, -a tool, and -o tool command lines.
-U url URL of HTML being formed (def: $URL)
NOTE: The '-U url' is passed as leading options on -b tool, -a tool, and -o tool command lines.
-w site_url Base URL of the website (def: $SITE_URL)
NOTE: The '-w site_url' is passed as leading options on -b tool, -a tool, and -o tool command lines.
-m mdtag string to write about the markdown file used to form HTML content (def: no markdown file is used)
-e string output 'string', followed by newline, to stderr (def: do not)
@@ -275,15 +278,18 @@ function global_variable_setup
export NOOP=
export DO_NOT_PROCESS=
export TOPDIR=
# REPO_TOP_URL set above the export USAGE line
# REPO_URL set above the export USAGE line
export MD2HTML_CFG=
export BEFORE_TOOL=
# DOCROOT_SLASH set above the export USAGE line
# PANDOC_WRAPPER set above the export USAGE line
# REPO_TOP_URL set above the export USAGE line
# REPO_URL set above the export USAGE line
# SITE_URL set above the export USAGE line
export P_FLAG_FOUND=
export CAP_P_FLAG_FOUND=
# REPO_TOP_URL set above the export USAGE line
# REPO_URL set above the export USAGE line
export U_FLAG_FOUND=
# URL set above the export USAGE line
@@ -634,15 +640,15 @@ function parse_command_line
#
OUTPUT_TOOL+=("$OPTARG")
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
B_OPTION+=("-u")
B_OPTION+=("$REPO_URL")
B_OPTION+=("$REPO_TOP_URL")
P_OPTION+=("-u")
P_OPTION+=("$REPO_URL")
P_OPTION+=("$REPO_TOP_URL")
A_OPTION+=("-u")
A_OPTION+=("$REPO_URL")
A_OPTION+=("$REPO_TOP_URL")
O_OPTION+=("-u")
O_OPTION+=("$REPO_URL")
O_OPTION+=("$REPO_TOP_URL")
;;
U) URL="$OPTARG"
B_OPTION+=("-U")
@@ -723,6 +729,7 @@ function debug_parameters
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: URL=$URL" 1>&2
@@ -1106,21 +1113,21 @@ export WORKING_DIR
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -1470,6 +1477,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: after parse in getopt phase: $GETOPT_PHASE: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: after parse in getopt phase: $GETOPT_PHASE: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
echo "$0: debug[3]: after parse in getopt phase: $GETOPT_PHASE: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
echo "$0: debug[3]: after parse in getopt phase: $GETOPT_PHASE: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: after parse in getopt phase: $GETOPT_PHASE: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: after parse in getopt phase: $GETOPT_PHASE: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: after parse in getopt phase: $GETOPT_PHASE: URL=$URL" 1>&2
+9 -6
View File
@@ -87,7 +87,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-07-23"
export VERSION="1.3.2 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -110,7 +110,9 @@ if [[ -z $NUMBER_TOOL ]]; then
exit 5
fi
export TOPDIR
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export TEMPLATE="template"
#
export NOOP=
@@ -298,21 +300,21 @@ fi
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -385,6 +387,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: NUMBER_TOOL=$NUMBER_TOOL" 1>&2
echo "$0: debug[3]: TEMPLATE=$TEMPLATE" 1>&2
+14 -9
View File
@@ -101,7 +101,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.7.1 2024-04-28"
export VERSION="1.7.2 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -119,14 +119,16 @@ fi
export TOPDIR
export DOCROOT_SLASH="../../"
export PANDOC_WRAPPER="bin/pandoc-wrapper.sh"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
export URL="#"
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-p tool] [-u repo_url] [-U url] [-w site_url] [-e string ..] [-E exitcode]
[-p tool] [-u repo_top_url] [-U url] [-w site_url] [-e string ..] [-E exitcode]
YYYY/dir
-h print help message and exit
@@ -142,7 +144,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool run 'pandoc wrapper tool' (not pandoc path) during HTML phase number 21 (def: use $PANDOC_WRAPPER)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
-U url URL of HTML file being formed (def: $URL)
-w site_url Base URL of the website (def: $SITE_URL)
@@ -401,7 +403,9 @@ while getopts :hv:Vd:D:nNp:u:U:w:e:E: flag; do
;;
p) PANDOC_WRAPPER="$OPTARG"
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
;;
U) URL="$OPTARG"
;;
@@ -449,21 +453,21 @@ export ENTRY_PATH="$1"
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -630,6 +634,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: URL=$URL" 1>&2
+14 -9
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
#
export VERSION="1.4.1 2024-04-28"
export VERSION="1.4.2 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -119,14 +119,16 @@ fi
export TOPDIR
export PANDOC_WRAPPER="bin/pandoc-wrapper.sh"
export DOCROOT_SLASH="../../"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
export URL="#"
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-p tool] [-u repo_url] [-U url] [-w site_url] [-e string ..] [-E exitcode]
[-p tool] [-u repo_top_url] [-U url] [-w site_url] [-e string ..] [-E exitcode]
YYYY/dir
-h print help message and exit
@@ -142,7 +144,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool run 'pandoc wrapper tool' (not pandoc path) during HTML phase number 21 (def: use $PANDOC_WRAPPER)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
-U url URL of HTML file being formed (def: $URL)
-w site_url Base URL of the website (def: $SITE_URL)
@@ -199,7 +201,9 @@ while getopts :hv:Vd:D:nNp:u:U:w:e:E: flag; do
;;
p) PANDOC_WRAPPER="$OPTARG"
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
;;
U) URL="$OPTARG"
;;
@@ -247,21 +251,21 @@ export ENTRY_PATH="$1"
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -429,6 +433,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: URL=$URL" 1>&2
+14 -9
View File
@@ -110,7 +110,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.4.2 2024-07-07"
export VERSION="1.4.3 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -127,14 +127,16 @@ if [[ $status -eq 0 ]]; then
fi
export TOPDIR
export DOCROOT_SLASH="../../"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
export PANDOC_WRAPPER="bin/pandoc-wrapper.sh"
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
[-p tool] [-u repo_url] [-U URL] [-w site_url] [-e string ..] [-E exitcode]
[-p tool] [-u repo_top_url] [-U URL] [-w site_url] [-e string ..] [-E exitcode]
YYYY [more_options]
-h print help message and exit
@@ -150,7 +152,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
-p tool run 'pandoc wrapper tool' (not pandoc path) during HTML phase number 21 (def: use $PANDOC_WRAPPER)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
-U url URL of HTML file being formed (def: $URL)
-w site_url Base URL of the website (def: $SITE_URL)
@@ -323,7 +325,9 @@ while getopts :hv:Vd:D:nNp:u:U:w:e:E: flag; do
;;
p) PANDOC_WRAPPER="$OPTARG"
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
;;
U) URL="$OPTARG"
;;
@@ -375,21 +379,21 @@ fi
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -506,6 +510,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
+14 -9
View File
@@ -99,7 +99,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.7 2024-06-22"
export VERSION="1.7.1 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -136,12 +136,14 @@ PANDOC_OPTION+=("html5")
PANDOC_OPTION+=("--wrap=preserve")
PANDOC_OPTION+=("--fail-if-warnings")
PANDOC_OPTION+=("--tab-stop=8")
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
[-p pandoc_tool] [-u repo_url] [-e string ..] [-E exitcode]
[-p pandoc_tool] [-u repo_top_url] [-e string ..] [-E exitcode]
file.md output.html
-h print help message and exit
@@ -155,7 +157,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
-p pandoc_tool path to the pandoc tool (not the wrapper) (def: $PANDOC_TOOL)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
-e string output string, followed by newline, to stderr (def: do not)
-E exitcode force exit with exitcode (def: exit based on success or failure of the action)
@@ -203,7 +205,9 @@ while getopts :hv:Vd:nNp:u:e:E: flag; do
;;
p) PANDOC_TOOL="$OPTARG"
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
;;
e) echo "$OPTARG" 1>&2
;;
@@ -283,21 +287,21 @@ export PANDOC_MIN_VERSION="3.1.12.2"
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -365,6 +369,7 @@ if [[ $V_FLAG -ge 3 ]]; then
for index in "${!PANDOC_OPTION[@]}"; do
echo "$0: debug[3]: PANDOC_OPTION[$index]=${PANDOC_OPTION[$index]}" 1>&2
done
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
+15 -12
View File
@@ -92,7 +92,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.1.5 2024-05-19"
export VERSION="1.1.6 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -120,7 +120,9 @@ export DOCROOT_SLASH="../../"
export TAGLINE="bin/readme2index.sh"
export MD2HTML_SH="bin/md2html.sh"
export PANDOC_WRAPPER="bin/pandoc-wrapper.sh"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
#
export NOOP=
@@ -135,7 +137,7 @@ declare -ag TOOL_OPTION
# usage
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_url] [-w site_url]
[-t tagline] [-T md2html.sh] [-p tool] [-u repo_top_url] [-w site_url]
tool [more_options]
-h print help message and exit
@@ -156,15 +158,15 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool run 'pandoc wrapper tool' (not pandoc path) during HTML phase number 21 (def: use $PANDOC_WRAPPER)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
NOTE: The '-u repo_url' is passed as leading options on tool command lines.
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
NOTE: The '-u repo_top_url' is passed as leading options on tool command lines.
-w site_url Base URL of the website (def: $SITE_URL)
NOTE: The '-w site_url' is passed as leading options on tool command lines.
tool the tool to run over all entries
[more_options] additional tool command line options to use before the YYYY/dir argument
NOTE: Any '-t tagline', '-T md2html.sh', '-p tool', '-u repo_url', '-w site_url'
NOTE: Any '-t tagline', '-T md2html.sh', '-p tool', '-u repo_top_url', '-w site_url'
are passed to the 'tool' at the beginning of the command line, and
before any optional 'more_options' and before the final YYYY/dir argument.
@@ -240,9 +242,9 @@ while getopts :hv:Vd:D:nNt:T:p:u:w: flag; do
TOOL_OPTION+=("-p")
TOOL_OPTION+=("$PANDOC_WRAPPER")
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
TOOL_OPTION+=("-u")
TOOL_OPTION+=("$REPO_URL")
TOOL_OPTION+=("$REPO_TOP_URL")
;;
w) SITE_URL="$OPTARG"
TOOL_OPTION+=("-w")
@@ -299,21 +301,21 @@ fi
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -489,6 +491,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
+15 -12
View File
@@ -86,7 +86,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.2.5 2024-05-19"
export VERSION="1.2.6 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -106,7 +106,9 @@ export DOCROOT_SLASH="../../"
export TAGLINE="bin/$NAME"
export MD2HTML_SH="bin/md2html.sh"
export PANDOC_WRAPPER="bin/pandoc-wrapper.sh"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
#
export NOOP=
@@ -122,7 +124,7 @@ declare -ag TOOL_OPTION
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-t tagline] [-T md2html.sh] [-p tool]
[-u repo_url] [-w site_url] [-e string ..] [-E exitcode]
[-u repo_top_url] [-w site_url] [-e string ..] [-E exitcode]
YYYY/dir
-h print help message and exit
@@ -147,8 +149,8 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p . skip HTML phase number 21 (def: do nothing during HTML phase number 21)
NOTE: The '-p tool' will be passed as leading options on the -b tool and -a tool command lines.
-u repo_url Base level URL of target git repo (def: $REPO_URL)
NOTE: The '-u repo_url' is passed as leading options on tool command lines.
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
NOTE: The '-u repo_top_url' is passed as leading options on tool command lines.
-w site_url Base URL of the website (def: $SITE_URL)
NOTE: The '-w site_url' is passed as leading options on tool command lines.
@@ -156,7 +158,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
NOTE: The '-v level' is passed as initial command line options to the 'markdown to html tool' (md2html.sh).
The 'tagline' is passed as '-t tagline' to the 'markdown to html tool' (md2html.sh), after the '-v level'.
Any '-T md2html.sh', '-p tool', '-P pandoc_opts', '-u repo_url', '-U top_url'
Any '-T md2html.sh', '-p tool', '-P pandoc_opts', '-u repo_top_url', '-U top_url'
are passed to the 'markdown to html tool' (md2html.sh), and will be before any command line arguments.
Exit codes:
@@ -233,9 +235,9 @@ while getopts :hv:Vd:D:nNt:T:p:u:w: flag; do
TOOL_OPTION+=("-p")
TOOL_OPTION+=("$PANDOC_WRAPPER")
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
TOOL_OPTION+=("-u")
TOOL_OPTION+=("$REPO_URL")
TOOL_OPTION+=("$REPO_TOP_URL")
;;
w) SITE_URL="$OPTARG"
TOOL_OPTION+=("-w")
@@ -292,21 +294,21 @@ fi
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -468,6 +470,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
+13 -5
View File
@@ -99,7 +99,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.1.7 2024-04-28"
export VERSION="1.1.8 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -115,7 +115,9 @@ if [[ $status -eq 0 ]]; then
TOPDIR=$("$GIT_TOOL" rev-parse --show-toplevel)
fi
export TOPDIR
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export TOP_URL="https://ioccc-src.github.io/temp-test-ioccc"
export SGI_TOOL="bin/sgi.sh"
@@ -209,16 +211,21 @@ export ENTRY_PATH="$1"
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -366,6 +373,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: TOP_URL=$TOP_URL" 1>&2
echo "$0: debug[3]: SGI_TOOL=$SGI_TOOL" 1>&2
+14 -9
View File
@@ -101,7 +101,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.4.1 2024-04-28"
export VERSION="1.4.2 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -119,14 +119,16 @@ fi
export TOPDIR
export DOCROOT_SLASH="./"
export PANDOC_WRAPPER="bin/pandoc-wrapper.sh"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
export URL="#"
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-p tool] [-u repo_url] [-U url] [-w site_url] [-e string ..] [-E exitcode]
[-p tool] [-u repo_top_url] [-U url] [-w site_url] [-e string ..] [-E exitcode]
-h print help message and exit
-v level set verbosity level (def level: 0)
@@ -141,7 +143,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool run 'pandoc wrapper tool' (not pandoc path) during HTML phase number 21 (def: use $PANDOC_WRAPPER)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
-U url URL of HTML file being formed (def: $URL)
-w site_url Base URL of the website (def: $SITE_URL)
@@ -198,7 +200,9 @@ while getopts :hv:Vd:D:nNp:u:U:w:e:E: flag; do
;;
p) PANDOC_WRAPPER="$OPTARG"
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
;;
U) URL="$OPTARG"
;;
@@ -247,21 +251,21 @@ fi
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -342,6 +346,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: URL=$URL" 1>&2
+10 -5
View File
@@ -92,7 +92,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 2024-04-20"
export VERSION="1.3.1 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -109,14 +109,16 @@ if [[ $status -eq 0 ]]; then
fi
export TOPDIR
export DOCROOT_SLASH="../../"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
export URL="#"
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-u repo_url] [-U url] [-w site_url] [-e string ..] [-E exitcode]
[-u repo_top_url] [-U url] [-w site_url] [-e string ..] [-E exitcode]
[ignored]
-h print help message and exit
@@ -130,7 +132,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-n go thru the actions, but do not update any files (def: do the action)
-N do not process file, just parse arguments and ignore the file (def: process the file)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
-U url URL of HTML file being formed (def: $URL)
-w site_url Base URL of the website (def: $SITE_URL)
@@ -184,7 +186,9 @@ while getopts :hv:Vd:D:nNu:U:w:e:E: flag; do
;;
N) DO_NOT_PROCESS="-N"
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
;;
U) URL="$OPTARG"
;;
@@ -238,6 +242,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: URL=$URL" 1>&2
+14 -9
View File
@@ -103,7 +103,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.3 2024-04-13"
export VERSION="1.3.4 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -120,13 +120,15 @@ if [[ $status -eq 0 ]]; then
fi
export TOPDIR
export DOCROOT_SLASH="../../"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
[-u repo_url] [-U URL] [-w site_url] [-e string ..] [-E exitcode]
[-u repo_top_url] [-U URL] [-w site_url] [-e string ..] [-E exitcode]
YYYY/dir
-h print help message and exit
@@ -140,7 +142,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
-n go thru the actions, but do not update any files (def: do the action)
-N do not process file, just parse arguments and ignore the file (def: process the file)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
-U url URL of HTML file being formed (def: $URL)
-w site_url Base URL of the website (def: $SITE_URL)
@@ -247,7 +249,9 @@ while getopts :hv:Vd:D:nNu:U:w:e:E: flag; do
;;
N) DO_NOT_PROCESS="-N"
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
;;
U) URL="$OPTARG"
;;
@@ -295,21 +299,21 @@ export ENTRY_PATH="$1"
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -470,6 +474,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
+14 -9
View File
@@ -103,7 +103,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.1.3 2024-04-13"
export VERSION="1.1.4 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -120,13 +120,15 @@ if [[ $status -eq 0 ]]; then
fi
export TOPDIR
export DOCROOT_SLASH="../../"
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
[-u repo_url] [-U URL] [-w site_url] [-e string ..] [-E exitcode]
[-u repo_top_url] [-U URL] [-w site_url] [-e string ..] [-E exitcode]
YYYY
-h print help message and exit
@@ -140,7 +142,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
-n go thru the actions, but do not update any files (def: do the action)
-N do not process file, just parse arguments and ignore the file (def: process the file)
-u repo_url Base level URL of target git repo (def: $REPO_URL)
-u repo_top_url Top level URL of target git repo (def: $REPO_TOP_URL)
-U url URL of HTML file being formed (def: $URL)
-w site_url Base URL of the website (def: $SITE_URL)
@@ -257,7 +259,9 @@ while getopts :hv:Vd:D:nNu:U:w:e:E: flag; do
;;
N) DO_NOT_PROCESS="-N"
;;
u) REPO_URL="$OPTARG"
u) REPO_TOP_URL="$OPTARG"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
;;
U) URL="$OPTARG"
;;
@@ -305,21 +309,21 @@ export YEAR_ARG="$1"
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -455,6 +459,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
+16 -11
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
#
export VERSION="1.3.8 2024-07-23"
export VERSION="1.3.9 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -99,7 +99,9 @@ if [[ $status -eq 0 ]]; then
TOPDIR=$("$GIT_TOOL" rev-parse --show-toplevel)
fi
export TOPDIR
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export CAP_W_FLAG_FOUND=
GTAR_TOOL=$(type -P gtar)
export GTAR_TOOL
@@ -111,7 +113,7 @@ fi
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-p tool] [-u repo_url] [-w site_url] [-W]
[-p tool] [-u repo_top_url] [-w site_url] [-W]
YYYY/dir
-h print help message and exit
@@ -126,7 +128,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool This option is ignored
-u repo_url This option is ignored
-u repo_top_url This option is ignored
-w site_url This option is ignored
-W Warn if a file in the manifest is missing: (def: error if a file is missing)
@@ -216,21 +218,21 @@ export ENTRY_PATH="$1"
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -435,6 +437,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2
@@ -582,9 +585,11 @@ if [[ -z $NOOP ]]; then
echo "$0: ERROR: awk -f $FILELIST_ENTRY_JSON_AWK $ENTRY_JSON > $TMP_MANIFEST_LIST failed, error: $status" 1>&2
exit 1
fi
echo "$IOCCC_CSS" >> "$TMP_MANIFEST_LIST"
echo "$VAR_MK" >> "$TMP_MANIFEST_LIST"
echo "$LEET_MK" >> "$TMP_MANIFEST_LIST"
{
echo "$IOCCC_CSS"
echo "$VAR_MK"
echo "$LEET_MK"
} >> "$TMP_MANIFEST_LIST"
LC_ALL=C sort -d "$TMP_MANIFEST_LIST" -o "$TMP_MANIFEST_LIST"
status="$?"
if [[ $status -ne 0 ]]; then
+11 -8
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
export VERSION="1.2.6 2024-07-23"
export VERSION="1.2.7 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -99,7 +99,9 @@ if [[ $status -eq 0 ]]; then
TOPDIR=$("$GIT_TOOL" rev-parse --show-toplevel)
fi
export TOPDIR
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export CAP_W_FLAG_FOUND=
GTAR_TOOL=$(type -P gtar)
export GTAR_TOOL
@@ -111,7 +113,7 @@ fi
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-p tool] [-u repo_url] [-w site_url] [-W]
[-p tool] [-u repo_top_url] [-w site_url] [-W]
YYYY
-h print help message and exit
@@ -126,7 +128,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool This option is ignored
-u repo_url This option is ignored
-u repo_top_url This option is ignored
-w site_url This option is ignored
-W Warn if a file in the manifest is missing: (def: error if a file is missing)
@@ -216,21 +218,21 @@ export YYYY="$1"
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -382,6 +384,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2
+11 -8
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
#
export VERSION="1.0.2 2024-04-13"
export VERSION="1.0.3 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -99,7 +99,9 @@ if [[ $status -eq 0 ]]; then
TOPDIR=$("$GIT_TOOL" rev-parse --show-toplevel)
fi
export TOPDIR
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export CAP_W_FLAG_FOUND=
GTAR_TOOL=$(type -P gtar)
export GTAR_TOOL
@@ -111,7 +113,7 @@ fi
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-p tool] [-u repo_url] [-w site_url] [-W]
[-p tool] [-u repo_top_url] [-w site_url] [-W]
YYYY/dir
-h print help message and exit
@@ -126,7 +128,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool This option is ignored
-u repo_url This option is ignored
-u repo_top_url This option is ignored
-w site_url This option is ignored
-W Warn if a file in the manifest is missing: (def: error if a file is missing)
@@ -215,21 +217,21 @@ export ENTRY_PATH="$1"
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -339,6 +341,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2
+11 -8
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
#
export VERSION="1.0.2 2024-04-14"
export VERSION="1.0.3 2024-07-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -99,7 +99,9 @@ if [[ $status -eq 0 ]]; then
TOPDIR=$("$GIT_TOOL" rev-parse --show-toplevel)
fi
export TOPDIR
export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc/blob/master"
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
export CAP_W_FLAG_FOUND=
GTAR_TOOL=$(type -P gtar)
export GTAR_TOOL
@@ -111,7 +113,7 @@ fi
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-p tool] [-u repo_url] [-w site_url] [-W]
[-p tool] [-u repo_top_url] [-w site_url] [-W]
YYYY
-h print help message and exit
@@ -126,7 +128,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-p tool This option is ignored
-u repo_url This option is ignored
-u repo_top_url This option is ignored
-w site_url This option is ignored
-W Warn if a file in the manifest is missing: (def: error if a file is missing)
@@ -215,21 +217,21 @@ export YYYY="$1"
# verify that we have a topdir directory
#
REPO_NAME=$(basename "$REPO_URL")
REPO_NAME=$(basename "$REPO_TOP_URL")
export REPO_NAME
if [[ -z $TOPDIR ]]; then
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -e $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR does not exist: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
if [[ ! -d $TOPDIR ]]; then
echo "$0: ERROR: TOPDIR is not a directory: $TOPDIR" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_URL; cd $REPO_NAME" 1>&2
echo "$0: Notice: if needed: $GIT_TOOL clone $REPO_TOP_URL; cd $REPO_NAME" 1>&2
exit 6
fi
@@ -325,6 +327,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
echo "$0: debug[3]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2