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