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:
1 parent
8eb8003d94
commit
b01a23d735
32 files changed
+617
-493
No files matched your search
+16
-13
@@ -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
|
||||
|
||||
Reference in new issue
Block a user