fix bin/tar-entry.sh and bin/tar-year.sh, improve bin/README.md, update Makefile

It turns out that `sed -i ''` is not portable. **sigh** Replaced use of
`sed -i ''` with other portable commands in `bin/tar-year.sh`.

Changed `bin/tar-entry.sh` VERSION from "1.3.4 2024-03-27"
to "1.3.5 2024-03-28".

Changed `bin/tar-year.sh` VERSION from "1.2 2024-03-27"
to "1.2.1 2024-03-28".

Changed `bin/gen-year-index.sh` VERSION from "1.0.4 2024-03-26"
to "1.0.5 2024-03-28".

Changed `bin/sort.gitignore.sh` VERSION from "1.1.3 2024-03-26"
to "1.1.4 2024-03-28".

Added new `bin/untar-year.sh` bin tool.

Tested `make untar_year_tarball` under Linux.

Added `make sort_gitignore` to sort entry `.gitignore` files.
The `make quick_www` and `make www` actions perform `make sort_gitignore`.

Added notes to `bin/README.md` (and thus to `bin/index.html` with
recommendations of top level Makefile actions that use selected bin
tools over all entries or years).

Tested `make www form_entry_tarball form_year_tarball untar_entry_tarball
untar_year_tarball` under Linux.

TODO: Retest `make www form_entry_tarball form_year_tarball
      untar_entry_tarball untar_year_tarball` under macOS.
This commit is contained in:
Landon Curt Noll committed 2024-03-28 03:35:47 -07:00
1 parent f07fec3a98
commit e4a76879ba
7 files changed
+608 -63

No files matched your search

+15 -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.1.3 2024-03-26"
export VERSION="1.1.4 2024-03-28"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -430,14 +430,20 @@ if [[ -z $NOOP ]]; then
echo "$0: ERROR: sgi.sh failed, error: $status" 1>&2
exit 12
fi
if [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: about to execute: mv -f $TMP_FILE $GITIGNORE" 1>&2
fi
mv -f "$TMP_FILE" "$GITIGNORE"
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: ERROR: sgi.sh failed, error: $status" 1>&2
exit 13
if cmp -s "$TMP_FILE" "$GITIGNORE"; then
if [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: $GITIGNORE is already sorted" 1>&2
fi
else
if [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: about to execute: mv -f $TMP_FILE $GITIGNORE" 1>&2
fi
mv -f "$TMP_FILE" "$GITIGNORE"
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: ERROR: sgi.sh failed, error: $status" 1>&2
exit 13
fi
fi
elif [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: -n disabled execution of: $SGI_TOOL < $GITIGNORE > $TMP_FILE" 1>&2