improve tmp filenames in bin tools

Temporary files are now of the form:

```
export TMP_AB_CD=".tmp.NAME.AB_CD.$$.tmp"
```

Where `NAME` is the basename of the script, and `AB_CD` is the
part of the exported variable name after the "TMP_".

This will help avoid bugs such as that
commit c7dc9a9f6b had to fix.

Added `.tmp.*` to the top level `.gitignore` file.

Changed `bin/chk-entry.sh` VERSION from "1.1.6 2024-04-13"
to "1.1.7 2024-04-28".

Changed `bin/gen-authors.sh` VERSION from "1.9 2024-04-21"
to "1.9.1 2024-04-28".

Changed `bin/gen-location.sh` VERSION from "1.4 2024-04-21"
to "1.4.1 2024-04-28".

Changed `bin/gen-other-html.sh` VERSION from "1.2.2 2024-04-21"
to "1.2.3 2024-04-28".

Changed `bin/gen-sitemap.sh` VERSION from "1.3.7 2024-04-14"
to "1.3.8 2024-04-28".

Changed `bin/gen-status.sh` VERSION from "1.5 2024-04-22"
to "1.5.1 2024-04-28".

Changed `bin/gen-years.sh` VERSION from "1.3 2024-04-21"
to "1.3.1 2024-04-28".

Changed `bin/md2html.sh` VERSION from "1.5 2024-04-20"
to "1.5.1 2024-04-28".

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

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

Changed `bin/output-year-index.sh` VERSION from "1.4 2024-04-21"
to "1.4.1 2024-04-28".

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

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

Changed `bin/tar-entry.sh` VERSION from "1.3.5 2024-04-13"
to "1.3.6 2024-04-28".

Changed `bin/tar-year.sh` VERSION from "1.2.3 2024-04-13"
to "1.2.4 2024-04-28".

Ran `make www` to perform test the above under macOS.
This commit is contained in:
Landon Curt Noll committed 2024-04-28 14:32:45 -07:00
1 parent c7dc9a9f6b
commit b3afeeaddd
21 files changed
+59 -58

No files matched your search

+6 -6
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 2024-04-20"
export VERSION="1.5.1 2024-04-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -1589,7 +1589,7 @@ fi
# create a temporary sed script
#
export TMP_SED_SCRIPT=".$NAME.$$.sed"
export TMP_SED_SCRIPT=".tmp.$NAME.SED_SCRIPT.$$.tmp"
if [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: temporary sed script: $TMP_SED_SCRIPT" 1>&2
fi
@@ -1632,7 +1632,7 @@ fi
#
# NOTE: This file, when we are finished building it, will be come the final index.html file.
#
export TMP_PHASE=".$NAME.$$.html-phase.html"
export TMP_PHASE=".tmp.$NAME.PHASE.$$.tmp"
if [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: temporary HTML file: $TMP_PHASE" 1>&2
fi
@@ -1659,7 +1659,7 @@ fi
#
# NOTE: This file, when we are finished building it, will be come the final index.html file.
#
export TMP_INDEX_HTML=".$NAME.$$.index.html"
export TMP_INDEX_HTML=".tmp.$NAME.INDEX_HTML.$$.tmp"
if [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: temporary index HTML file: $TMP_INDEX_HTML" 1>&2
fi
@@ -1687,7 +1687,7 @@ fi
export ORIG_INPUT_MD="$MATCH_MD"
if [[ -z $NOOP ]]; then
if [[ $INPUT_MD == - ]]; then
export TMP_INPUT_MD=".$NAME.$$.stdin.md"
export TMP_INPUT_MD=".tmp.$NAME.INPUT_MD.$$.tmp"
if [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: temporary stdin file: $TMP_INPUT_MD" 1>&2
fi
@@ -1731,7 +1731,7 @@ fi
#
if [[ -z $NOOP ]]; then
export TMP_STRIPPED_MD=".$NAME.$$.stripped.md"
export TMP_STRIPPED_MD=".tmp.$NAME.STRIPPED_MD.$$.tmp"
if [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: temporary stripped markdown file: $TMP_STRIPPED_MD" 1>&2
fi