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:
1 parent
f07fec3a98
commit
e4a76879ba
7 files changed
+608
-63
No files matched your search
+16
-12
@@ -85,7 +85,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.0.4 2024-03-26"
|
||||
export VERSION="1.0.5 2024-03-28"
|
||||
NAME=$(basename "$0")
|
||||
export NAME
|
||||
export V_FLAG=0
|
||||
@@ -312,8 +312,12 @@ if [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: now in directory: $(/bin/pwd)" 1>&2
|
||||
fi
|
||||
|
||||
# verify that YYYY is a entry directory
|
||||
# verify that YYYY is an IOCCC year directory
|
||||
#
|
||||
if [[ ! -e $YYYY ]]; then
|
||||
echo "$0: ERROR: arg does not exist: $YYYY" 1>&2
|
||||
exit 6
|
||||
fi
|
||||
if [[ ! -d $YYYY ]]; then
|
||||
echo "$0: ERROR: arg is not a directory: $YYYY" 1>&2
|
||||
exit 6
|
||||
@@ -325,21 +329,21 @@ fi
|
||||
|
||||
# verify that YYYY has a non-empty readable .year file
|
||||
#
|
||||
export YEAR_FILE="$YYYY/.year"
|
||||
if [[ ! -e $YEAR_FILE ]]; then
|
||||
echo "$0: ERROR: YYYY/.year does not exist: $YEAR_FILE" 1>&2
|
||||
export DOT_YEAR="$YYYY/.year"
|
||||
if [[ ! -e $DOT_YEAR ]]; then
|
||||
echo "$0: ERROR: YYYY/.year does not exist: $DOT_YEAR" 1>&2
|
||||
exit 6
|
||||
fi
|
||||
if [[ ! -f $YEAR_FILE ]]; then
|
||||
echo "$0: ERROR: YYYY/.year is not a regular file: $YEAR_FILE" 1>&2
|
||||
if [[ ! -f $DOT_YEAR ]]; then
|
||||
echo "$0: ERROR: YYYY/.year is not a regular file: $DOT_YEAR" 1>&2
|
||||
exit 6
|
||||
fi
|
||||
if [[ ! -r $YEAR_FILE ]]; then
|
||||
echo "$0: ERROR: YYYY/.year is not an readable file: $YEAR_FILE" 1>&2
|
||||
if [[ ! -r $DOT_YEAR ]]; then
|
||||
echo "$0: ERROR: YYYY/.year is not an readable file: $DOT_YEAR" 1>&2
|
||||
exit 6
|
||||
fi
|
||||
if [[ ! -s $YEAR_FILE ]]; then
|
||||
echo "$0: ERROR: YYYY/.year is not a non-empty readable file: $YEAR_FILE" 1>&2
|
||||
if [[ ! -s $DOT_YEAR ]]; then
|
||||
echo "$0: ERROR: YYYY/.year is not a non-empty readable file: $DOT_YEAR" 1>&2
|
||||
exit 6
|
||||
fi
|
||||
|
||||
@@ -404,7 +408,7 @@ if [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: YYYY=$YYYY" 1>&2
|
||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
||||
echo "$0: debug[3]: CD_FAILED=$CD_FAILED" 1>&2
|
||||
echo "$0: debug[3]: YEAR_FILE=$YEAR_FILE" 1>&2
|
||||
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
||||
echo "$0: debug[3]: README_FILE=$README_FILE" 1>&2
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user