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
+22
-14
@@ -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
|
||||
|
||||
Reference in new issue
Block a user