improve bin tool script shell variable use
We export shell variables where needed. We print debug messages of shell variables in the order they were exported or declared, except for the USAGE shell variable, for those shell variables that were exported or declared prior to the set of debug messages of shell variables. Changed `bin/chk-entry.sh` VERSION from "1.1.3 2024-03-18" to "1.1.4 2024-03-26". Changed `bin/gen-authors.sh` VERSION from "1.3.1 2024-03-18" to "1.3.2 2024-03-26". Changed `bin/gen-location.sh` VERSION from "1.1.1 2024-03-18" to "1.1.2 2024-03-26". Changed `bin/gen-other-html.sh` VERSION from "1.0.1 2024-03-08" to "1.0.2 2024-03-26". Changed `bin/gen-sitemap.sh` VERSION from "1.3.2 2024-03-18" to "1.3.3 2024-03-26". Changed `bin/gen-status.sh` VERSION from "1.1.1 2024-03-18" to "1.1.2 2024-03-26". Changed `bin/gen-years.sh` VERSION from "1.0.2 2024-03-13" to "1.0.3 2024-03-26". Changed `bin/md2html.sh` VERSION from "1.1.1 2024-03-09" to "1.1.2 2024-03-26". Changed `bin/output-index-author.sh` VERSION from "1.5.1 2024-03-19" to "1.5.2 2024-03-26". Changed `bin/output-index-inventory.sh` VERSION from "1.2.2 2024-03-19" to "1.2.3 2024-03-26". Changed `bin/output-year-index.sh` VERSION from "1.1.1 2024-03-19" to "1.1.2 2024-03-26". Changed `bin/pandoc-wrapper.sh` VERSION from "1.5.2 2024-03-19" to "1.5.3 2024-03-26". Changed `bin/quick-readme2index.sh` VERSION from "1.1.2 2024-03-08" to "1.1.3 2024-03-26". Changed `bin/readme2index.sh` VERSION from "1.2.1 2024-02-23" to "1.2.2 2024-02-26". Changed `bin/sort.gitignore.sh` VERSION from "1.1.2 2024-03-18" to "1.1.3 2024-03-26". Changed `bin/status2html.sh` VERSION from "1.1.1 2024-03-19" to "1.1.2 2024-03-26". Changed `bin/subst.default.sh` VERSION from "1.2.1 2024-02-23" to "1.2.2 2024-02-26". Changed `bin/subst.entry-index.sh` VERSION from "1.3.1 2024-03-19" to "1.3.2 2024-03-26". Changed `bin/tar-all.sh` VERSION from "1.1.1 2024-03-18" to "1.1.2 2024-03-26". Changed `bin/tar-entry.sh` VERSION from "1.3.1 2024-03-25" to "1.3.2 2024-03-26". Changed `bin/tar-year.sh` VERSION from "1.1.1 2024-03-18" to "1.1.2 2024-03-26". Changed `bin/all-years.sh` VERSION from "1.0.1 2024-02-23" to "1.0.2 2024-02-26". Changed `bin/gen-top-html.sh` VERSION from "1.2.1 2024-03-08" to "1.2.2 2024-03-26". Changed `bin/gen-year-index.sh` VERSION from "1.0.3 2024-03-09" to "1.0.4 2024-03-26". Changed `bin/subst.year-index.sh` VERSION from "1.1.1 2024-03-19" to "1.1.2 2024-03-26". Changed `bin/untar-entry.sh` VERSION from "1.0 2024-03-25" to "1.0.1 2024-03-26".
This commit is contained in:
1 parent
0834d59263
commit
c176b51cec
27 files changed
+281
-174
No files matched your search
+3
-2
@@ -113,7 +113,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.3.1 2024-02-23"
|
export VERSION="1.3.2 2024-02-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -420,11 +420,12 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
||||||
echo "$0: debug[3]: TOOL=$TOOL" 1>&2
|
|
||||||
for index in "${!TOOL_OPTION[@]}"; do
|
for index in "${!TOOL_OPTION[@]}"; do
|
||||||
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
||||||
done
|
done
|
||||||
|
echo "$0: debug[3]: TOOL=$TOOL" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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]: TOP_FILE=$TOP_FILE" 1>&2
|
echo "$0: debug[3]: TOP_FILE=$TOP_FILE" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+4
-3
@@ -111,7 +111,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.0.1 2024-02-23"
|
export VERSION="1.0.2 2024-02-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -410,7 +410,6 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
||||||
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
||||||
echo "$0: debug[3]: TOP_FILE=$TOP_FILE" 1>&2
|
|
||||||
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
||||||
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
|
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
|
||||||
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
|
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
|
||||||
@@ -420,11 +419,13 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
||||||
echo "$0: debug[3]: TOOL=$TOOL" 1>&2
|
|
||||||
for index in "${!TOOL_OPTION[@]}"; do
|
for index in "${!TOOL_OPTION[@]}"; do
|
||||||
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
||||||
done
|
done
|
||||||
|
echo "$0: debug[3]: TOOL=$TOOL" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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]: TOP_FILE=$TOP_FILE" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -N stops early before any processing is performed
|
# -N stops early before any processing is performed
|
||||||
|
|||||||
+9
-5
@@ -83,7 +83,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.1.3 2024-03-18"
|
export VERSION="1.1.4 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -308,6 +308,7 @@ if [[ ! -s $DOT_PATH ]]; then
|
|||||||
exit 7
|
exit 7
|
||||||
fi
|
fi
|
||||||
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
||||||
|
export DOT_PATH_CONTENT
|
||||||
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
||||||
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
||||||
exit 7
|
exit 7
|
||||||
@@ -328,7 +329,7 @@ fi
|
|||||||
|
|
||||||
# verify we have our awk tool
|
# verify we have our awk tool
|
||||||
#
|
#
|
||||||
FILELIST_ENTRY_JSON_AWK="$BIN_DIR/filelist.entry.json.awk"
|
export FILELIST_ENTRY_JSON_AWK="$BIN_DIR/filelist.entry.json.awk"
|
||||||
if [[ ! -e $FILELIST_ENTRY_JSON_AWK ]]; then
|
if [[ ! -e $FILELIST_ENTRY_JSON_AWK ]]; then
|
||||||
echo "$0: ERROR: filelist.entry.json.awk does not exist: $FILELIST_ENTRY_JSON_AWK" 1>&2
|
echo "$0: ERROR: filelist.entry.json.awk does not exist: $FILELIST_ENTRY_JSON_AWK" 1>&2
|
||||||
exit 5
|
exit 5
|
||||||
@@ -357,16 +358,19 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
|
||||||
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
||||||
|
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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]: BIN_PATH=$BIN_PATH" 1>&2
|
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
||||||
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
||||||
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_DIR=$ENTRY_DIR" 1>&2
|
echo "$0: debug[3]: ENTRY_DIR=$ENTRY_DIR" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_ID=$ENTRY_ID" 1>&2
|
echo "$0: debug[3]: ENTRY_ID=$ENTRY_ID" 1>&2
|
||||||
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
||||||
|
echo "$0: debug[3]: YYYY_DIR=$YYYY_DIR" 1>&2
|
||||||
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
||||||
|
echo "$0: debug[3]: DOT_PATH_CONTENT=$DOT_PATH_CONTENT" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
||||||
echo "$0: debug[3]: FILELIST_ENTRY_JSON_AWK=$FILELIST_ENTRY_JSON_AWK" 1>&2
|
echo "$0: debug[3]: FILELIST_ENTRY_JSON_AWK=$FILELIST_ENTRY_JSON_AWK" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -382,7 +386,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary file manifest list
|
# create a temporary file manifest list
|
||||||
#
|
#
|
||||||
TMP_MANIFEST_LIST=".$NAME.$$.manifest.list"
|
export TMP_MANIFEST_LIST=".$NAME.$$.manifest.list"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary file manifest list: $TMP_MANIFEST_LIST" 1>&2
|
echo "$0: debug[3]: temporary file manifest list: $TMP_MANIFEST_LIST" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -404,7 +408,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary find files list
|
# create a temporary find files list
|
||||||
#
|
#
|
||||||
TMP_FILE_LIST=".$NAME.$$.find.list"
|
export TMP_FILE_LIST=".$NAME.$$.find.list"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary file manifest list: $TMP_FILE_LIST" 1>&2
|
echo "$0: debug[3]: temporary file manifest list: $TMP_FILE_LIST" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
+26
-8
@@ -83,7 +83,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.3.1 2024-03-18"
|
export VERSION="1.3.2 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -404,6 +404,7 @@ function output_location_code
|
|||||||
function output_award
|
function output_award
|
||||||
{
|
{
|
||||||
local ENTRY_JSON_PATH; # the .entry.json path
|
local ENTRY_JSON_PATH; # the .entry.json path
|
||||||
|
local AWARD_STRING; # winning entry award string
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
#
|
#
|
||||||
@@ -427,12 +428,12 @@ function output_award
|
|||||||
|
|
||||||
# obtain the award string
|
# obtain the award string
|
||||||
#
|
#
|
||||||
AWARD=$(grep -F '"award" : "' "$ENTRY_JSON_PATH" | sed -e 's/^.*"award" : "//' -e 's/",//')
|
AWARD_STRING=$(grep -F '"award" : "' "$ENTRY_JSON_PATH" | sed -e 's/^.*"award" : "//' -e 's/",//')
|
||||||
if [[ -z $AWARD ]]; then
|
if [[ -z $AWARD_STRING ]]; then
|
||||||
echo "$0: ERROR: in output_award: no award found in .entry.json file: $ENTRY_JSON_PATH" 1>&2
|
echo "$0: ERROR: in output_award: no award found in .entry.json file: $ENTRY_JSON_PATH" 1>&2
|
||||||
return 5
|
return 5
|
||||||
fi
|
fi
|
||||||
echo "$AWARD"
|
echo "$AWARD_STRING"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -639,6 +640,7 @@ export BIN_DIR="bin"
|
|||||||
# find the location tool
|
# find the location tool
|
||||||
#
|
#
|
||||||
LOCATION_TOOL=$(type -P location)
|
LOCATION_TOOL=$(type -P location)
|
||||||
|
export LOCATION_TOOL
|
||||||
if [[ -z $LOCATION_TOOL ]]; then
|
if [[ -z $LOCATION_TOOL ]]; then
|
||||||
# guess we have a location tool in bin
|
# guess we have a location tool in bin
|
||||||
#
|
#
|
||||||
@@ -671,15 +673,22 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: REPO_URL=$REPO_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]: SITE_URL=$SITE_URL" 1>&2
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
for index in "${!IS_FOR[@]}"; do
|
||||||
|
echo "$0: debug[3]: IS_FOR[$index]=${IS_FOR[$index]}" 1>&2
|
||||||
|
done
|
||||||
for index in "${!TOOL_OPTION[@]}"; do
|
for index in "${!TOOL_OPTION[@]}"; do
|
||||||
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
||||||
done
|
done
|
||||||
|
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
||||||
|
echo "$0: debug[3]: CD_FAILED=$CD_FAILED" 1>&2
|
||||||
echo "$0: debug[3]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
echo "$0: debug[3]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
||||||
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
||||||
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
||||||
|
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
||||||
|
echo "$0: debug[3]: LOCATION_TOOL=$LOCATION_TOOL" 1>&2
|
||||||
|
echo "$0: debug[3]: AUTHORS_HTML=$AUTHORS_HTML" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -N stops early before any processing is performed
|
# -N stops early before any processing is performed
|
||||||
@@ -693,7 +702,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary entry markdown file
|
# create a temporary entry markdown file
|
||||||
#
|
#
|
||||||
TMP_AUTHORS_MD=".$NAME.$$.entry.md"
|
export TMP_AUTHORS_MD=".$NAME.$$.entry.md"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary entry markdown file: $TMP_AUTHORS_MD" 1>&2
|
echo "$0: debug[3]: temporary entry markdown file: $TMP_AUTHORS_MD" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -715,7 +724,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary sort word list file
|
# create a temporary sort word list file
|
||||||
#
|
#
|
||||||
TMP_SORT_WORD=".$NAME.$$.sort.word"
|
export TMP_SORT_WORD=".$NAME.$$.sort.word"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary sort word list file: $TMP_SORT_WORD" 1>&2
|
echo "$0: debug[3]: temporary sort word list file: $TMP_SORT_WORD" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -751,6 +760,7 @@ done > "$TMP_SORT_WORD"
|
|||||||
#
|
#
|
||||||
find "$AUTHOR_DIR" -mindepth 1 -maxdepth 1 -type f -name '*.json' 2>/dev/null | while read -r json_file; do
|
find "$AUTHOR_DIR" -mindepth 1 -maxdepth 1 -type f -name '*.json' 2>/dev/null | while read -r json_file; do
|
||||||
SORT_WORD=$(grep -F '"sort_word" : "' "$json_file" 2>/dev/null | sed -e 's/",//' -e 's/^.*"//')
|
SORT_WORD=$(grep -F '"sort_word" : "' "$json_file" 2>/dev/null | sed -e 's/",//' -e 's/^.*"//')
|
||||||
|
export SORT_WORD
|
||||||
echo "$SORT_WORD $json_file"
|
echo "$SORT_WORD $json_file"
|
||||||
done >> "$TMP_SORT_WORD"
|
done >> "$TMP_SORT_WORD"
|
||||||
|
|
||||||
@@ -835,17 +845,20 @@ EOF
|
|||||||
exit 15
|
exit 15
|
||||||
fi
|
fi
|
||||||
FULL_NAME=$(output_full_name "$filename")
|
FULL_NAME=$(output_full_name "$filename")
|
||||||
|
export FULL_NAME
|
||||||
if [[ -z $FULL_NAME ]]; then
|
if [[ -z $FULL_NAME ]]; then
|
||||||
echo "$0: ERROR: full name is empty in: $filename" 1>&2
|
echo "$0: ERROR: full name is empty in: $filename" 1>&2
|
||||||
exit 16
|
exit 16
|
||||||
fi
|
fi
|
||||||
LOCATION_CODE=$(output_location_code "$filename")
|
LOCATION_CODE=$(output_location_code "$filename")
|
||||||
|
export LOCATION_CODE
|
||||||
if [[ -z $LOCATION_CODE ]]; then
|
if [[ -z $LOCATION_CODE ]]; then
|
||||||
echo "$0: ERROR: location code is empty in: $filename" 1>&2
|
echo "$0: ERROR: location code is empty in: $filename" 1>&2
|
||||||
exit 17
|
exit 17
|
||||||
fi
|
fi
|
||||||
LOCATION_NAME=$("$LOCATION_TOOL" "$LOCATION_CODE" 2>/dev/null)
|
LOCATION_NAME=$("$LOCATION_TOOL" "$LOCATION_CODE" 2>/dev/null)
|
||||||
status="$?"
|
status="$?"
|
||||||
|
export LOCATION_NAME
|
||||||
if [[ $status -ne 0 ]]; then
|
if [[ $status -ne 0 ]]; then
|
||||||
echo "$0: ERROR: cannot determine location name" \
|
echo "$0: ERROR: cannot determine location name" \
|
||||||
"for location ISO 3166 code: $LOCATION_CODE" 1>&2
|
"for location ISO 3166 code: $LOCATION_CODE" 1>&2
|
||||||
@@ -858,6 +871,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
LOCATION_COMMON_NAME=$("$LOCATION_TOOL" -c "$LOCATION_CODE" 2>/dev/null)
|
LOCATION_COMMON_NAME=$("$LOCATION_TOOL" -c "$LOCATION_CODE" 2>/dev/null)
|
||||||
status="$?"
|
status="$?"
|
||||||
|
export LOCATION_COMMON_NAME
|
||||||
if [[ $status -ne 0 ]]; then
|
if [[ $status -ne 0 ]]; then
|
||||||
echo "$0: ERROR: cannot determine location common name" \
|
echo "$0: ERROR: cannot determine location common name" \
|
||||||
"for location ISO 3166 code: $LOCATION_CODE" 1>&2
|
"for location ISO 3166 code: $LOCATION_CODE" 1>&2
|
||||||
@@ -869,6 +883,7 @@ EOF
|
|||||||
exit 21
|
exit 21
|
||||||
fi
|
fi
|
||||||
AUTHOR_HANDLE=$(output_author_handle "$filename")
|
AUTHOR_HANDLE=$(output_author_handle "$filename")
|
||||||
|
export AUTHOR_HANDLE
|
||||||
if [[ -z $AUTHOR_HANDLE ]]; then
|
if [[ -z $AUTHOR_HANDLE ]]; then
|
||||||
echo "$0: ERROR: author handle is empty in: $filename" 1>&2
|
echo "$0: ERROR: author handle is empty in: $filename" 1>&2
|
||||||
exit 22
|
exit 22
|
||||||
@@ -901,6 +916,7 @@ EOF
|
|||||||
exit 23
|
exit 23
|
||||||
fi
|
fi
|
||||||
YYYY_DIR=$(echo "$ENTRY_ID" | tr _ /)
|
YYYY_DIR=$(echo "$ENTRY_ID" | tr _ /)
|
||||||
|
export YYYY_DIR
|
||||||
if [[ ! -d $YYYY_DIR ]]; then
|
if [[ ! -d $YYYY_DIR ]]; then
|
||||||
echo "$0: ERROR: YYYY/dir is not a directory" 1>&2
|
echo "$0: ERROR: YYYY/dir is not a directory" 1>&2
|
||||||
exit 24
|
exit 24
|
||||||
@@ -909,6 +925,7 @@ EOF
|
|||||||
# verify that the .entry.json file is a non-empty readable file
|
# verify that the .entry.json file is a non-empty readable file
|
||||||
#
|
#
|
||||||
ENTRY_JSON="$YYYY_DIR/.entry.json"
|
ENTRY_JSON="$YYYY_DIR/.entry.json"
|
||||||
|
export ENTRY_JSON
|
||||||
if [[ ! -e $ENTRY_JSON ]]; then
|
if [[ ! -e $ENTRY_JSON ]]; then
|
||||||
echo "$0: ERROR: .entry.json does not exist: $ENTRY_JSON" 1>&2
|
echo "$0: ERROR: .entry.json does not exist: $ENTRY_JSON" 1>&2
|
||||||
exit 25
|
exit 25
|
||||||
@@ -932,6 +949,7 @@ EOF
|
|||||||
# collect the award for this entry id
|
# collect the award for this entry id
|
||||||
#
|
#
|
||||||
AWARD=$(output_award "$ENTRY_JSON")
|
AWARD=$(output_award "$ENTRY_JSON")
|
||||||
|
export AWARD
|
||||||
if [[ -z $AWARD ]]; then
|
if [[ -z $AWARD ]]; then
|
||||||
echo "$0: ERROR: award not found in .entry.json: $ENTRY_JSON" 1>&2
|
echo "$0: ERROR: award not found in .entry.json: $ENTRY_JSON" 1>&2
|
||||||
exit 29
|
exit 29
|
||||||
|
|||||||
+13
-4
@@ -84,7 +84,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.1.1 2024-03-18"
|
export VERSION="1.1.2 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -368,6 +368,7 @@ fi
|
|||||||
# find the location tool
|
# find the location tool
|
||||||
#
|
#
|
||||||
LOCATION_TOOL=$(type -P location)
|
LOCATION_TOOL=$(type -P location)
|
||||||
|
export LOCATION_TOOL
|
||||||
if [[ -z $LOCATION_TOOL ]]; then
|
if [[ -z $LOCATION_TOOL ]]; then
|
||||||
# guess we have a location tool in bin
|
# guess we have a location tool in bin
|
||||||
#
|
#
|
||||||
@@ -400,15 +401,18 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: REPO_URL=$REPO_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]: SITE_URL=$SITE_URL" 1>&2
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
|
||||||
for index in "${!TOOL_OPTION[@]}"; do
|
for index in "${!TOOL_OPTION[@]}"; do
|
||||||
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
||||||
done
|
done
|
||||||
|
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
||||||
|
echo "$0: debug[3]: CD_FAILED=$CD_FAILED" 1>&2
|
||||||
echo "$0: debug[3]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
echo "$0: debug[3]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
||||||
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
||||||
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
||||||
|
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
||||||
|
echo "$0: debug[3]: LOCATION_TOOL=$LOCATION_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: LOCATION_HTML=$LOCATION_HTML" 1>&2
|
echo "$0: debug[3]: LOCATION_HTML=$LOCATION_HTML" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -423,7 +427,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary location markdown file
|
# create a temporary location markdown file
|
||||||
#
|
#
|
||||||
TMP_LOC_MD=".$NAME.$$.location.md"
|
export TMP_LOC_MD=".$NAME.$$.location.md"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary location markdown file: $TMP_LOC_MD" 1>&2
|
echo "$0: debug[3]: temporary location markdown file: $TMP_LOC_MD" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -464,6 +468,7 @@ fi
|
|||||||
#
|
#
|
||||||
LOCATION_NAME=$("$LOCATION_TOOL" "$LOCATION_CODE" 2>/dev/null)
|
LOCATION_NAME=$("$LOCATION_TOOL" "$LOCATION_CODE" 2>/dev/null)
|
||||||
status="$?"
|
status="$?"
|
||||||
|
export LOCATION_NAME
|
||||||
if [[ $status -ne 0 ]]; then
|
if [[ $status -ne 0 ]]; then
|
||||||
echo "$0: ERROR: cannot determine location name for location ISO 3166 code: $LOCATION_CODE" 1>&2
|
echo "$0: ERROR: cannot determine location name for location ISO 3166 code: $LOCATION_CODE" 1>&2
|
||||||
exit 12
|
exit 12
|
||||||
@@ -473,6 +478,7 @@ fi
|
|||||||
#
|
#
|
||||||
LOCATION_COMMON_NAME=$("$LOCATION_TOOL" -c "$LOCATION_CODE" 2>/dev/null)
|
LOCATION_COMMON_NAME=$("$LOCATION_TOOL" -c "$LOCATION_CODE" 2>/dev/null)
|
||||||
status="$?"
|
status="$?"
|
||||||
|
export LOCATION_COMMON_NAME
|
||||||
if [[ $status -ne 0 ]]; then
|
if [[ $status -ne 0 ]]; then
|
||||||
echo "$0: ERROR: cannot determine location common name" \
|
echo "$0: ERROR: cannot determine location common name" \
|
||||||
"for location ISO 3166 code: $LOCATION_CODE" 1>&2
|
"for location ISO 3166 code: $LOCATION_CODE" 1>&2
|
||||||
@@ -485,6 +491,7 @@ fi
|
|||||||
xargs -0 grep -l '"location_code".*:.*"'"$LOCATION_CODE"'"' |
|
xargs -0 grep -l '"location_code".*:.*"'"$LOCATION_CODE"'"' |
|
||||||
wc -l |
|
wc -l |
|
||||||
sed -e 's/[[:space:]]*//')
|
sed -e 's/[[:space:]]*//')
|
||||||
|
export AUTHOR_COUNT
|
||||||
if [[ -z $AUTHOR_COUNT || $AUTHOR_COUNT -le 0 ]]; then
|
if [[ -z $AUTHOR_COUNT || $AUTHOR_COUNT -le 0 ]]; then
|
||||||
echo "$0: ERROR: author count was zero for location: $LOCATION_CODE" 1>&2
|
echo "$0: ERROR: author count was zero for location: $LOCATION_CODE" 1>&2
|
||||||
exit 14
|
exit 14
|
||||||
@@ -520,10 +527,12 @@ fi
|
|||||||
# The author_handle foo_bin is found in author/foo_bar.json
|
# The author_handle foo_bin is found in author/foo_bar.json
|
||||||
#
|
#
|
||||||
AUTHOR_HANDLE=$(basename "$AUTHOR_HANDLE_PATH" .json)
|
AUTHOR_HANDLE=$(basename "$AUTHOR_HANDLE_PATH" .json)
|
||||||
|
export AUTHOR_HANDLE
|
||||||
|
|
||||||
# fetch full_name
|
# fetch full_name
|
||||||
#
|
#
|
||||||
FULL_NAME=$(grep '"full_name".*:' "$AUTHOR_HANDLE_PATH" | sed -e 's/^.*: "//' -e 's/",*$//')
|
FULL_NAME=$(grep '"full_name".*:' "$AUTHOR_HANDLE_PATH" | sed -e 's/^.*: "//' -e 's/",*$//')
|
||||||
|
export FULL_NAME
|
||||||
|
|
||||||
# output the author from the location
|
# output the author from the location
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.0.1 2024-03-08"
|
export VERSION="1.0.2 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -366,6 +366,7 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
||||||
done
|
done
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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]: TOP_FILE=$TOP_FILE" 1>&2
|
echo "$0: debug[3]: TOP_FILE=$TOP_FILE" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -383,7 +384,7 @@ fi
|
|||||||
# It is a pain to set the EXIT_CODE deep inside a loop, so we write the EXIT_CODE into a file
|
# It is a pain to set the EXIT_CODE deep inside a loop, so we write the EXIT_CODE into a file
|
||||||
# and read the file (setting EXIT_CODE again) after the loop. A hack, but good enough for our needs.
|
# and read the file (setting EXIT_CODE again) after the loop. A hack, but good enough for our needs.
|
||||||
#
|
#
|
||||||
TMP_EXIT_CODE=".$NAME.$$.exit.code"
|
export TMP_EXIT_CODE=".$NAME.$$.exit.code"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary exit code: $TMP_EXIT_CODE" 1>&2
|
echo "$0: debug[3]: temporary exit code: $TMP_EXIT_CODE" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -594,7 +595,7 @@ for YYYY in $(< "$TOP_FILE"); do
|
|||||||
|
|
||||||
# determine the number of levels in path of MD_FILE from topdir
|
# determine the number of levels in path of MD_FILE from topdir
|
||||||
#
|
#
|
||||||
NO_SLASH=${MD_FILE///}
|
export NO_SLASH=${MD_FILE///}
|
||||||
LEVEL_CNT=$((${#MD_FILE} - ${#NO_SLASH}))
|
LEVEL_CNT=$((${#MD_FILE} - ${#NO_SLASH}))
|
||||||
export LEVEL_CNT
|
export LEVEL_CNT
|
||||||
if [[ $LEVEL_CNT -lt 2 ]]; then
|
if [[ $LEVEL_CNT -lt 2 ]]; then
|
||||||
|
|||||||
+10
-8
@@ -84,7 +84,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.3.2 2024-03-18"
|
export VERSION="1.3.3 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -478,11 +478,14 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
||||||
echo "$0: debug[3]: REPO_URL=$REPO_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]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
|
||||||
|
echo "$0: debug[3]: MODTIME_METHOD=$MODTIME_METHOD" 1>&2
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
|
|
||||||
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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]: ARCHIVE_HISTORIC_PATH=$ARCHIVE_HISTORIC_PATH" 1>&2
|
echo "$0: debug[3]: ARCHIVE_HISTORIC_PATH=$ARCHIVE_HISTORIC_PATH" 1>&2
|
||||||
echo "$0: debug[3]: ARCHIVE_HISTORIC_DIR=$ARCHIVE_HISTORIC_DIR" 1>&2
|
echo "$0: debug[3]: ARCHIVE_HISTORIC_DIR=$ARCHIVE_HISTORIC_DIR" 1>&2
|
||||||
echo "$0: debug[3]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
echo "$0: debug[3]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
||||||
@@ -491,11 +494,9 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
||||||
echo "$0: debug[3]: INC_PATH=$INC_PATH" 1>&2
|
echo "$0: debug[3]: INC_PATH=$INC_PATH" 1>&2
|
||||||
echo "$0: debug[3]: INC_DIR=$INC_DIR" 1>&2
|
echo "$0: debug[3]: INC_DIR=$INC_DIR" 1>&2
|
||||||
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
|
||||||
echo "$0: debug[3]: SITEMAP=$SITEMAP" 1>&2
|
echo "$0: debug[3]: SITEMAP=$SITEMAP" 1>&2
|
||||||
echo "$0: debug[3]: FILELIST_ENTRY_JSON_AWK=$FILELIST_ENTRY_JSON_AWK" 1>&2
|
echo "$0: debug[3]: FILELIST_ENTRY_JSON_AWK=$FILELIST_ENTRY_JSON_AWK" 1>&2
|
||||||
echo "$0: debug[3]: FILELIST=$FILELIST" 1>&2
|
echo "$0: debug[3]: TOP_FILE=$TOP_FILE" 1>&2
|
||||||
echo "$0: debug[3]: MODTIME_METHOD=$MODTIME_METHOD" 1>&2
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If -N, time to exit
|
# If -N, time to exit
|
||||||
@@ -509,7 +510,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary file manifest list
|
# create a temporary file manifest list
|
||||||
#
|
#
|
||||||
TMP_MANIFEST_LIST=".$NAME.$$.manifest.list"
|
export TMP_MANIFEST_LIST=".$NAME.$$.manifest.list"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary file manifest list: $TMP_MANIFEST_LIST" 1>&2
|
echo "$0: debug[3]: temporary file manifest list: $TMP_MANIFEST_LIST" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -530,7 +531,7 @@ fi
|
|||||||
# It is a pain to set the EXIT_CODE deep inside a loop, so we write the EXIT_CODE into a file
|
# It is a pain to set the EXIT_CODE deep inside a loop, so we write the EXIT_CODE into a file
|
||||||
# and read the file (setting EXIT_CODE again) after the loop. A hack, but good enough for our needs.
|
# and read the file (setting EXIT_CODE again) after the loop. A hack, but good enough for our needs.
|
||||||
#
|
#
|
||||||
TMP_EXIT_CODE=".$NAME.$$.exit.code"
|
export TMP_EXIT_CODE=".$NAME.$$.exit.code"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary exit code: $TMP_EXIT_CODE" 1>&2
|
echo "$0: debug[3]: temporary exit code: $TMP_EXIT_CODE" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -548,7 +549,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary sitemap
|
# create a temporary sitemap
|
||||||
#
|
#
|
||||||
TMP_SITEMAP=".$NAME.$$.sitemap"
|
export TMP_SITEMAP=".$NAME.$$.sitemap"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary tarball: $TMP_SITEMAP" 1>&2
|
echo "$0: debug[3]: temporary tarball: $TMP_SITEMAP" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -863,6 +864,7 @@ if [[ -z $NOOP ]]; then
|
|||||||
#
|
#
|
||||||
LC_ALL=C sort -d -f -u -t / "$TMP_MANIFEST_LIST" | while read -r FILE_PATH; do
|
LC_ALL=C sort -d -f -u -t / "$TMP_MANIFEST_LIST" | while read -r FILE_PATH; do
|
||||||
LASTMOD=$(output_modtime "$FILE_PATH")
|
LASTMOD=$(output_modtime "$FILE_PATH")
|
||||||
|
export LASTMOD
|
||||||
echo '<url>'
|
echo '<url>'
|
||||||
echo " <loc>$SITE_URL/$FILE_PATH</loc>"
|
echo " <loc>$SITE_URL/$FILE_PATH</loc>"
|
||||||
echo " <lastmod>$LASTMOD</lastmod>"
|
echo " <lastmod>$LASTMOD</lastmod>"
|
||||||
|
|||||||
+9
-6
@@ -84,7 +84,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.1.1 2024-03-18"
|
export VERSION="1.1.2 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -701,22 +701,25 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
||||||
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
|
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
|
||||||
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
|
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
|
||||||
echo "$0: debug[3]: CONTEST_STATUS=$CONTEST_STATUS" 1>&2
|
|
||||||
echo "$0: debug[3]: REPO_URL=$REPO_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]: SITE_URL=$SITE_URL" 1>&2
|
||||||
echo "$0: debug[3]: JPARSE_TOOL=$JPARSE_TOOL" 1>&2
|
echo "$0: debug[3]: JPARSE_TOOL=$JPARSE_TOOL" 1>&2
|
||||||
|
echo "$0: debug[3]: IOCCC_STATUS_VERSION=$IOCCC_STATUS_VERSION" 1>&2
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
||||||
echo "$0: debug[3]: MODTIME_METHOD=$MODTIME_METHOD" 1>&2
|
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
|
||||||
for index in "${!TOOL_OPTION[@]}"; do
|
for index in "${!TOOL_OPTION[@]}"; do
|
||||||
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
||||||
done
|
done
|
||||||
|
echo "$0: debug[3]: MODTIME_METHOD=$MODTIME_METHOD" 1>&2
|
||||||
|
echo "$0: debug[3]: CONTEST_STATUS=$CONTEST_STATUS" 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]: NEWS_HTML=$NEWS_HTML" 1>&2
|
echo "$0: debug[3]: NEWS_HTML=$NEWS_HTML" 1>&2
|
||||||
echo "$0: debug[3]: STATUS_JSON=$STATUS_JSON" 1>&2
|
echo "$0: debug[3]: STATUS_JSON=$STATUS_JSON" 1>&2
|
||||||
echo "$0: debug[3]: STATUS_MD=$STATUS_MD" 1>&2
|
echo "$0: debug[3]: STATUS_MD=$STATUS_MD" 1>&2
|
||||||
echo "$0: debug[3]: STATUS_HTML=$STATUS_HTML" 1>&2
|
echo "$0: debug[3]: STATUS_HTML=$STATUS_HTML" 1>&2
|
||||||
|
echo "$0: debug[3]: TOP_FILE=$TOP_FILE" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# validate JSON in status.json
|
# validate JSON in status.json
|
||||||
@@ -777,7 +780,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary status.json file
|
# create a temporary status.json file
|
||||||
#
|
#
|
||||||
TMP_STATUS_JSON=".$NAME.$$.entry.md"
|
export TMP_STATUS_JSON=".$NAME.$$.entry.md"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary status.json file: $TMP_STATUS_JSON" 1>&2
|
echo "$0: debug[3]: temporary status.json file: $TMP_STATUS_JSON" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
+6
-3
@@ -88,7 +88,7 @@ TOP_MD_SET+=("faq")
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.2.1 2024-03-08"
|
export VERSION="1.2.2 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -112,6 +112,7 @@ export REPO_URL="https://github.com/ioccc-src/temp-test-ioccc"
|
|||||||
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
|
export SITE_URL="https://ioccc-src.github.io/temp-test-ioccc"
|
||||||
#
|
#
|
||||||
unset TOP_MD_SET
|
unset TOP_MD_SET
|
||||||
|
declare -ag TOP_MD_SET
|
||||||
TOP_MD_SET+=("CODE_OF_CONDUCT")
|
TOP_MD_SET+=("CODE_OF_CONDUCT")
|
||||||
TOP_MD_SET+=("README")
|
TOP_MD_SET+=("README")
|
||||||
TOP_MD_SET+=("archive/historic/README")
|
TOP_MD_SET+=("archive/historic/README")
|
||||||
@@ -421,15 +422,17 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: TOP_MD_SET[$index]=${TOP_MD_SET[$index]}" 1>&2
|
echo "$0: debug[3]: TOP_MD_SET[$index]=${TOP_MD_SET[$index]}" 1>&2
|
||||||
done
|
done
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
|
||||||
for index in "${!TOOL_OPTION[@]}"; do
|
for index in "${!TOOL_OPTION[@]}"; do
|
||||||
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
||||||
done
|
done
|
||||||
|
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
||||||
|
echo "$0: debug[3]: CD_FAILED=$CD_FAILED" 1>&2
|
||||||
echo "$0: debug[3]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
echo "$0: debug[3]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
||||||
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
||||||
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
||||||
|
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
||||||
echo "$0: debug[3]: LOCATION_HTML=$LOCATION_HTML" 1>&2
|
echo "$0: debug[3]: LOCATION_HTML=$LOCATION_HTML" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.0.3 2024-03-09"
|
export VERSION="1.0.4 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -396,13 +396,14 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
|
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
|
||||||
echo "$0: debug[3]: REPO_URL=$REPO_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]: SITE_URL=$SITE_URL" 1>&2
|
||||||
|
for index in "${!TOOL_OPTION[@]}"; do
|
||||||
|
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
||||||
|
done
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: YYYY=$YYYY" 1>&2
|
echo "$0: debug[3]: YYYY=$YYYY" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
||||||
for index in "${!TOOL_OPTION[@]}"; do
|
echo "$0: debug[3]: CD_FAILED=$CD_FAILED" 1>&2
|
||||||
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
|
||||||
done
|
|
||||||
echo "$0: debug[3]: YEAR_FILE=$YEAR_FILE" 1>&2
|
echo "$0: debug[3]: YEAR_FILE=$YEAR_FILE" 1>&2
|
||||||
echo "$0: debug[3]: README_FILE=$README_FILE" 1>&2
|
echo "$0: debug[3]: README_FILE=$README_FILE" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
+9
-6
@@ -83,7 +83,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.0.2 2024-03-13"
|
export VERSION="1.0.3 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -196,6 +196,7 @@ $NAME version: $VERSION"
|
|||||||
function output_award
|
function output_award
|
||||||
{
|
{
|
||||||
local ENTRY_JSON_PATH; # the .entry.json path
|
local ENTRY_JSON_PATH; # the .entry.json path
|
||||||
|
local AWARD_STRING; # winning entry award string
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
#
|
#
|
||||||
@@ -219,12 +220,12 @@ function output_award
|
|||||||
|
|
||||||
# obtain the award string
|
# obtain the award string
|
||||||
#
|
#
|
||||||
AWARD=$(grep -F '"award" : "' "$ENTRY_JSON_PATH" | sed -e 's/^.*"award" : "//' -e 's/",//')
|
AWARD_STRING=$(grep -F '"award" : "' "$ENTRY_JSON_PATH" | sed -e 's/^.*"award" : "//' -e 's/",//')
|
||||||
if [[ -z $AWARD ]]; then
|
if [[ -z $AWARD_STRING ]]; then
|
||||||
echo "$0: ERROR: in output_award: no award found in .entry.json file: $ENTRY_JSON_PATH" 1>&2
|
echo "$0: ERROR: in output_award: no award found in .entry.json file: $ENTRY_JSON_PATH" 1>&2
|
||||||
return 5
|
return 5
|
||||||
fi
|
fi
|
||||||
echo "$AWARD"
|
echo "$AWARD_STRING"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -516,6 +517,7 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
||||||
echo "$0: debug[3]: TAC_TOOL=$TAC_TOOL" 1>&2
|
echo "$0: debug[3]: TAC_TOOL=$TAC_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: FMT_TOOL=$FMT_TOOL" 1>&2
|
echo "$0: debug[3]: FMT_TOOL=$FMT_TOOL" 1>&2
|
||||||
|
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
||||||
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
|
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
|
||||||
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
|
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
|
||||||
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
|
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
|
||||||
@@ -524,10 +526,11 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
|
||||||
for index in "${!TOOL_OPTION[@]}"; do
|
for index in "${!TOOL_OPTION[@]}"; do
|
||||||
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
||||||
done
|
done
|
||||||
|
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
||||||
|
echo "$0: debug[3]: CD_FAILED=$CD_FAILED" 1>&2
|
||||||
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
||||||
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
||||||
echo "$0: debug[3]: TOP_FILE=$TOP_FILE" 1>&2
|
echo "$0: debug[3]: TOP_FILE=$TOP_FILE" 1>&2
|
||||||
@@ -545,7 +548,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary years markdown file
|
# create a temporary years markdown file
|
||||||
#
|
#
|
||||||
TMP_YEARS_MD=".$NAME.$$.years.md"
|
export TMP_YEARS_MD=".$NAME.$$.years.md"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary years markdown file: $TMP_YEARS_MD" 1>&2
|
echo "$0: debug[3]: temporary years markdown file: $TMP_YEARS_MD" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
+51
-30
@@ -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
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.1.1 2024-03-09"
|
export VERSION="1.1.2 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -720,38 +720,58 @@ function debug_parameters
|
|||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: REPO_URL=$REPO_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: SITE_URL=$SITE_URL" 1>&2
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: URL=$URL" 1>&2
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: URL=$URL" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: USAGE=$USAGE" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: USAGE=$USAGE" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: USAGE=$USAGE" 1>&2
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: NOOP=$NOOP" 1>&2
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: TOPDIR=$TOPDIR" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: USAGE=$USAGE" 1>&2
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: MD2HTML_CFG=$MD2HTML_CFG" 1>&2
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: MD2HTML_CFG=$MD2HTML_CFG" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: BEFORE_TOOL=$BEFORE_TOOL" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: USAGE=$USAGE" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: USAGE=$USAGE" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: USAGE=$USAGE" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: USAGE=$USAGE" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: P_FLAG_FOUND=$P_FLAG_FOUND" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: CAP_P_FLAG_FOUND=$CAP_P_FLAG_FOUND" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: USAGE=$USAGE" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: U_FLAG_FOUND=$U_FLAG_FOUND" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: USAGE=$USAGE" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: CAP_U_FLAG_FOUND=$CAP_U_FLAG_FOUND" 1>&2
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: AFTER_TOOL=$AFTER_TOOL" 1>&2
|
||||||
|
for index in "${!TOKEN[@]}"; do
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: TOKEN[$index]=${TOKEN[$index]}" 1>&2
|
||||||
|
done
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: CAP_S_FLAG=$CAP_S_FLAG" 1>&2
|
||||||
|
for index in "${!OUTPUT_TOOL[@]}"; do
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: OUTPUT_TOOL[$index]=${OUTPUT_TOOL[$index]}" 1>&2
|
||||||
|
done
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: TAGLINE=$TAGLINE" 1>&2
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: TAGLINE=$TAGLINE" 1>&2
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: MDTAG=$MDTAG" 1>&2
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: MDTAG=$MDTAG" 1>&2
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: BEFORE_TOOL=$BEFORE_TOOL" 1>&2
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: MATCH_MD=$MATCH_MD" 1>&2
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: AFTER_TOOL=$AFTER_TOOL" 1>&2
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: INPUT_MD=$INPUT_MD" 1>&2
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: WORKING_DIR=$WORKING_DIR" 1>&2
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: OUTPUT_HTML=$OUTPUT_HTML" 1>&2
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: REPO_NAME=$REPO_NAME" 1>&2
|
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: INC_PATH=$INC_PATH" 1>&2
|
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: TOP=$TOP" 1>&2
|
|
||||||
for index in "${!PHASE_NAME[@]}"; do
|
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: phase name $index: ${PHASE_NAME[$index]}"
|
|
||||||
done 1>&2
|
|
||||||
for index in "${!TOKEN[@]}"; do
|
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: token $index to be replaced with: ${TOKEN[$index]}"
|
|
||||||
done 1>&2
|
|
||||||
for index in "${!OUTPUT_TOOL[@]}"; do
|
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: OUTPUT_TOOL[$index]=${OUTPUT_TOOL[$index]}"
|
|
||||||
done 1>&2
|
|
||||||
for index in "${!B_OPTION[@]}"; do
|
for index in "${!B_OPTION[@]}"; do
|
||||||
echo "$0: debug[3]: $DBG_PREFIX: B_OPTION[$index]=${B_OPTION[$index]}"
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: B_OPTION[$index]=${B_OPTION[$index]}" 1>&2
|
||||||
done 1>&2
|
done
|
||||||
for index in "${!P_OPTION[@]}"; do
|
for index in "${!P_OPTION[@]}"; do
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: P_OPTION[$index]=${P_OPTION[$index]}"
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: P_OPTION[$index]=${P_OPTION[$index]}" 1>&2
|
||||||
done 1>&2
|
done
|
||||||
for index in "${!A_OPTION[@]}"; do
|
for index in "${!A_OPTION[@]}"; do
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: A_OPTION[$index]=${A_OPTION[$index]}"
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: A_OPTION[$index]=${A_OPTION[$index]}" 1>&2
|
||||||
done 1>&2
|
done
|
||||||
for index in "${!O_OPTION[@]}"; do
|
for index in "${!O_OPTION[@]}"; do
|
||||||
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: O_OPTION[$index]=${O_OPTION[$index]}"
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: O_OPTION[$index]=${O_OPTION[$index]}" 1>&2
|
||||||
done 1>&2
|
done
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: GIT_TOOL=$GIT_TOOL" 1>&2
|
||||||
|
for index in "${!PHASE_NAME[@]}"; do
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: PHASE_NAME[$index]=${PHASE_NAME[$index]}" 1>&2
|
||||||
|
done
|
||||||
|
for index in "${!HTML_PHASE_NAME[@]}"; do
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: HTML_PHASE_NAME[$index]=${HTML_PHASE_NAME[$index]}" 1>&2
|
||||||
|
done
|
||||||
|
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: GETOPT_PHASE=$GETOPT_PHASE" 1>&2
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -914,6 +934,7 @@ function append_html_phase
|
|||||||
local SED_SCRIPT # file contain sed commands
|
local SED_SCRIPT # file contain sed commands
|
||||||
local TMP_PHASE_FILE # temp file used to write sed script results
|
local TMP_PHASE_FILE # temp file used to write sed script results
|
||||||
local TMP_APPEND # growing temporary HTML file to append tmp_phase onto
|
local TMP_APPEND # growing temporary HTML file to append tmp_phase onto
|
||||||
|
local PHASE_FILE # HTML filename for the given phase
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
#
|
#
|
||||||
@@ -1084,8 +1105,8 @@ fi
|
|||||||
# In the case of a year level directory, this will be a YYYY working directory.
|
# In the case of a year level directory, this will be a YYYY working directory.
|
||||||
# In the case of a top level directory, this will be just a . working directory.
|
# In the case of a top level directory, this will be just a . working directory.
|
||||||
#
|
#
|
||||||
export WORKING_DIR
|
|
||||||
WORKING_DIR=$(dirname "$MATCH_MD")
|
WORKING_DIR=$(dirname "$MATCH_MD")
|
||||||
|
export WORKING_DIR
|
||||||
|
|
||||||
# verify that we have a topdir directory
|
# verify that we have a topdir directory
|
||||||
#
|
#
|
||||||
@@ -1460,7 +1481,7 @@ fi
|
|||||||
#
|
#
|
||||||
for n in "${PHASE_NAME[@]}"; do
|
for n in "${PHASE_NAME[@]}"; do
|
||||||
if [[ ${HTML_PHASE_NAME[$n]} != . ]]; then
|
if [[ ${HTML_PHASE_NAME[$n]} != . ]]; then
|
||||||
HTML_PHASE_FILE="$INC_DIR/$n.${HTML_PHASE_NAME[$n]}.html"
|
export HTML_PHASE_FILE="$INC_DIR/$n.${HTML_PHASE_NAME[$n]}.html"
|
||||||
if [[ $V_FLAG -ge 9 ]]; then
|
if [[ $V_FLAG -ge 9 ]]; then
|
||||||
echo "$0: debug[9]: HTML phase $n: ${HTML_PHASE_NAME[$n]} file: $HTML_PHASE_FILE" 1>&2
|
echo "$0: debug[9]: HTML phase $n: ${HTML_PHASE_NAME[$n]} file: $HTML_PHASE_FILE" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -1572,7 +1593,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary sed script
|
# create a temporary sed script
|
||||||
#
|
#
|
||||||
TMP_SED_SCRIPT=".$NAME.$$.sed"
|
export TMP_SED_SCRIPT=".$NAME.$$.sed"
|
||||||
if [[ $V_FLAG -ge 5 ]]; then
|
if [[ $V_FLAG -ge 5 ]]; then
|
||||||
echo "$0: debug[5]: temporary sed script: $TMP_SED_SCRIPT" 1>&2
|
echo "$0: debug[5]: temporary sed script: $TMP_SED_SCRIPT" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -1615,7 +1636,7 @@ fi
|
|||||||
#
|
#
|
||||||
# NOTE: This file, when we are finished building it, will be come the final index.html file.
|
# NOTE: This file, when we are finished building it, will be come the final index.html file.
|
||||||
#
|
#
|
||||||
TMP_PHASE=".$NAME.$$.html-phase.html"
|
export TMP_PHASE=".$NAME.$$.html-phase.html"
|
||||||
if [[ $V_FLAG -ge 5 ]]; then
|
if [[ $V_FLAG -ge 5 ]]; then
|
||||||
echo "$0: debug[5]: temporary HTML file: $TMP_PHASE" 1>&2
|
echo "$0: debug[5]: temporary HTML file: $TMP_PHASE" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -1642,7 +1663,7 @@ fi
|
|||||||
#
|
#
|
||||||
# NOTE: This file, when we are finished building it, will be come the final index.html file.
|
# NOTE: This file, when we are finished building it, will be come the final index.html file.
|
||||||
#
|
#
|
||||||
TMP_INDEX_HTML=".$NAME.$$.index.html"
|
export TMP_INDEX_HTML=".$NAME.$$.index.html"
|
||||||
if [[ $V_FLAG -ge 5 ]]; then
|
if [[ $V_FLAG -ge 5 ]]; then
|
||||||
echo "$0: debug[5]: temporary index HTML file: $TMP_INDEX_HTML" 1>&2
|
echo "$0: debug[5]: temporary index HTML file: $TMP_INDEX_HTML" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -1668,7 +1689,7 @@ fi
|
|||||||
# input.md is -, we will need to capture standard input into a new temporary file
|
# input.md is -, we will need to capture standard input into a new temporary file
|
||||||
#
|
#
|
||||||
if [[ $INPUT_MD == - ]]; then
|
if [[ $INPUT_MD == - ]]; then
|
||||||
TMP_INPUT_MD=".$NAME.$$.stdin.md"
|
export TMP_INPUT_MD=".$NAME.$$.stdin.md"
|
||||||
if [[ $V_FLAG -ge 5 ]]; then
|
if [[ $V_FLAG -ge 5 ]]; then
|
||||||
echo "$0: debug[5]: temporary stdin file: $TMP_INPUT_MD" 1>&2
|
echo "$0: debug[5]: temporary stdin file: $TMP_INPUT_MD" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.5.1 2024-03-19"
|
export VERSION="1.5.2 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -446,9 +446,6 @@ if [[ $# -ne 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
export ENTRY_PATH="$1"
|
export ENTRY_PATH="$1"
|
||||||
if [[ $V_FLAG -ge 1 ]]; then
|
|
||||||
echo "$0: debug[1]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# verify that we have a topdir directory
|
# verify that we have a topdir directory
|
||||||
#
|
#
|
||||||
@@ -574,6 +571,7 @@ if [[ ! -s $DOT_PATH ]]; then
|
|||||||
exit 7
|
exit 7
|
||||||
fi
|
fi
|
||||||
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
||||||
|
export DOT_PATH_CONTENT
|
||||||
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
||||||
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
||||||
exit 7
|
exit 7
|
||||||
@@ -610,6 +608,7 @@ fi
|
|||||||
# find the location tool
|
# find the location tool
|
||||||
#
|
#
|
||||||
LOCATION_TOOL=$(type -P location)
|
LOCATION_TOOL=$(type -P location)
|
||||||
|
export LOCATION_TOOL
|
||||||
if [[ -z $LOCATION_TOOL ]]; then
|
if [[ -z $LOCATION_TOOL ]]; then
|
||||||
# guess we have a location tool in bin
|
# guess we have a location tool in bin
|
||||||
#
|
#
|
||||||
@@ -638,6 +637,7 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
echo "$0: debug[3]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
||||||
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
||||||
echo "$0: debug[3]: INC_PATH=$INC_PATH" 1>&2
|
echo "$0: debug[3]: INC_PATH=$INC_PATH" 1>&2
|
||||||
@@ -648,16 +648,18 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: ENTRY_DIR=$ENTRY_DIR" 1>&2
|
echo "$0: debug[3]: ENTRY_DIR=$ENTRY_DIR" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_ID=$ENTRY_ID" 1>&2
|
echo "$0: debug[3]: ENTRY_ID=$ENTRY_ID" 1>&2
|
||||||
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
||||||
|
echo "$0: debug[3]: YYYY_DIR=$YYYY_DIR" 1>&2
|
||||||
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
||||||
|
echo "$0: debug[3]: DOT_PATH_CONTENT=$DOT_PATH_CONTENT" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
||||||
echo "$0: debug[3]: LOCATION_TOOL=$LOCATION_TOOL" 1>&2
|
echo "$0: debug[3]: LOCATION_TOOL=$LOCATION_TOOL" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set AUTHOR_HANDLE_SET with author handles from .entry.json
|
# Set AUTHOR_HANDLE_SET with author handles from .entry.json
|
||||||
#
|
#
|
||||||
export AUTHOR_HANDLE_SET
|
|
||||||
AUTHOR_HANDLE_SET=$(output_author_handles "$ENTRY_JSON")
|
AUTHOR_HANDLE_SET=$(output_author_handles "$ENTRY_JSON")
|
||||||
status="$?"
|
status="$?"
|
||||||
|
export AUTHOR_HANDLE_SET
|
||||||
if [[ $status -ne 0 || -z $AUTHOR_HANDLE_SET ]]; then
|
if [[ $status -ne 0 || -z $AUTHOR_HANDLE_SET ]]; then
|
||||||
echo "$0: ERROR: unable to obtain any author handles from: $ENTRY_JSON" 1>&2
|
echo "$0: ERROR: unable to obtain any author handles from: $ENTRY_JSON" 1>&2
|
||||||
exit 7
|
exit 7
|
||||||
@@ -674,7 +676,7 @@ for author_handle in $AUTHOR_HANDLE_SET; do
|
|||||||
|
|
||||||
# determine the author handle JSON path
|
# determine the author handle JSON path
|
||||||
#
|
#
|
||||||
AUTHOR_HANDLE_JSON="$AUTHOR_DIR/$author_handle.json"
|
export AUTHOR_HANDLE_JSON="$AUTHOR_DIR/$author_handle.json"
|
||||||
|
|
||||||
# verify that /author/author_handle.json exists as a readable file
|
# verify that /author/author_handle.json exists as a readable file
|
||||||
#
|
#
|
||||||
@@ -698,6 +700,7 @@ for author_handle in $AUTHOR_HANDLE_SET; do
|
|||||||
#
|
#
|
||||||
ENTRY_ID_FOUND=$(output_entry_ids "$AUTHOR_HANDLE_JSON" | grep -F -- "$ENTRY_ID")
|
ENTRY_ID_FOUND=$(output_entry_ids "$AUTHOR_HANDLE_JSON" | grep -F -- "$ENTRY_ID")
|
||||||
status="$?"
|
status="$?"
|
||||||
|
export ENTRY_ID_FOUND
|
||||||
if [[ $status -ne 0 || -z $ENTRY_ID_FOUND ]]; then
|
if [[ $status -ne 0 || -z $ENTRY_ID_FOUND ]]; then
|
||||||
echo "$0: ERROR: entry id: $ENTRY_ID not found in author JSON file: $AUTHOR_HANDLE_JSON, status: $status" 1>&2
|
echo "$0: ERROR: entry id: $ENTRY_ID not found in author JSON file: $AUTHOR_HANDLE_JSON, status: $status" 1>&2
|
||||||
exit 8
|
exit 8
|
||||||
@@ -710,6 +713,7 @@ for author_handle in $AUTHOR_HANDLE_SET; do
|
|||||||
#
|
#
|
||||||
FULL_NAME=$(output_full_name "$AUTHOR_HANDLE_JSON")
|
FULL_NAME=$(output_full_name "$AUTHOR_HANDLE_JSON")
|
||||||
status="$?"
|
status="$?"
|
||||||
|
export FULL_NAME
|
||||||
if [[ $status -ne 0 || -z $FULL_NAME ]]; then
|
if [[ $status -ne 0 || -z $FULL_NAME ]]; then
|
||||||
echo "$0: ERROR: author JSON file: $AUTHOR_HANDLE_JSON as no FULL NAME, status: $status" 1>&2
|
echo "$0: ERROR: author JSON file: $AUTHOR_HANDLE_JSON as no FULL NAME, status: $status" 1>&2
|
||||||
exit 8
|
exit 8
|
||||||
@@ -722,6 +726,7 @@ for author_handle in $AUTHOR_HANDLE_SET; do
|
|||||||
#
|
#
|
||||||
LOCATION_CODE=$(output_location_code "$AUTHOR_HANDLE_JSON")
|
LOCATION_CODE=$(output_location_code "$AUTHOR_HANDLE_JSON")
|
||||||
status="$?"
|
status="$?"
|
||||||
|
export LOCATION_CODE
|
||||||
if [[ $status -ne 0 || -z $LOCATION_CODE ]]; then
|
if [[ $status -ne 0 || -z $LOCATION_CODE ]]; then
|
||||||
echo "$0: ERROR: author JSON file: $AUTHOR_HANDLE_JSON as no Location Code, status: $status" 1>&2
|
echo "$0: ERROR: author JSON file: $AUTHOR_HANDLE_JSON as no Location Code, status: $status" 1>&2
|
||||||
exit 8
|
exit 8
|
||||||
@@ -742,7 +747,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary markdown for pandoc to process
|
# create a temporary markdown for pandoc to process
|
||||||
#
|
#
|
||||||
TMP_FILE=".$NAME.$$.md"
|
export TMP_FILE=".$NAME.$$.md"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary markdown file: $TMP_FILE" 1>&2
|
echo "$0: debug[3]: temporary markdown file: $TMP_FILE" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -766,6 +771,7 @@ fi
|
|||||||
#
|
#
|
||||||
{
|
{
|
||||||
AUTHOR_COUNT=$(echo "$AUTHOR_HANDLE_SET" | wc -l)
|
AUTHOR_COUNT=$(echo "$AUTHOR_HANDLE_SET" | wc -l)
|
||||||
|
export AUTHOR_COUNT
|
||||||
if [[ $AUTHOR_COUNT -gt 1 ]]; then
|
if [[ $AUTHOR_COUNT -gt 1 ]]; then
|
||||||
echo '## <a name="author"></a>Authors:'
|
echo '## <a name="author"></a>Authors:'
|
||||||
else
|
else
|
||||||
@@ -786,12 +792,13 @@ for author_handle in $AUTHOR_HANDLE_SET; do
|
|||||||
|
|
||||||
# determine the author handle JSON path
|
# determine the author handle JSON path
|
||||||
#
|
#
|
||||||
AUTHOR_HANDLE_JSON="$AUTHOR_DIR/$author_handle.json"
|
export AUTHOR_HANDLE_JSON="$AUTHOR_DIR/$author_handle.json"
|
||||||
|
|
||||||
# obtain the Full Name from the author handle JSON file
|
# obtain the Full Name from the author handle JSON file
|
||||||
#
|
#
|
||||||
FULL_NAME=$(output_full_name "$AUTHOR_HANDLE_JSON")
|
FULL_NAME=$(output_full_name "$AUTHOR_HANDLE_JSON")
|
||||||
status="$?"
|
status="$?"
|
||||||
|
export FULL_NAME
|
||||||
if [[ $status -ne 0 || -z $FULL_NAME ]]; then
|
if [[ $status -ne 0 || -z $FULL_NAME ]]; then
|
||||||
echo "$0: ERROR: author JSON file: $AUTHOR_HANDLE_JSON as no FULL NAME, status: $status" 1>&2
|
echo "$0: ERROR: author JSON file: $AUTHOR_HANDLE_JSON as no FULL NAME, status: $status" 1>&2
|
||||||
exit 12
|
exit 12
|
||||||
@@ -801,6 +808,7 @@ for author_handle in $AUTHOR_HANDLE_SET; do
|
|||||||
#
|
#
|
||||||
LOCATION_CODE=$(output_location_code "$AUTHOR_HANDLE_JSON")
|
LOCATION_CODE=$(output_location_code "$AUTHOR_HANDLE_JSON")
|
||||||
status="$?"
|
status="$?"
|
||||||
|
export LOCATION_CODE
|
||||||
if [[ $status -ne 0 || -z $LOCATION_CODE ]]; then
|
if [[ $status -ne 0 || -z $LOCATION_CODE ]]; then
|
||||||
echo "$0: ERROR: author JSON file: $AUTHOR_HANDLE_JSON as no Location Code, status: $status" 1>&2
|
echo "$0: ERROR: author JSON file: $AUTHOR_HANDLE_JSON as no Location Code, status: $status" 1>&2
|
||||||
exit 13
|
exit 13
|
||||||
@@ -810,6 +818,7 @@ for author_handle in $AUTHOR_HANDLE_SET; do
|
|||||||
#
|
#
|
||||||
LOCATION_NAME=$("$LOCATION_TOOL" "$LOCATION_CODE" 2>/dev/null)
|
LOCATION_NAME=$("$LOCATION_TOOL" "$LOCATION_CODE" 2>/dev/null)
|
||||||
status="$?"
|
status="$?"
|
||||||
|
export LOCATION_NAME
|
||||||
if [[ $status -ne 0 ]]; then
|
if [[ $status -ne 0 ]]; then
|
||||||
echo "$0: ERROR: cannot determine location name for location ISO 3166 code: $LOCATION_CODE" 1>&2
|
echo "$0: ERROR: cannot determine location name for location ISO 3166 code: $LOCATION_CODE" 1>&2
|
||||||
exit 14
|
exit 14
|
||||||
@@ -819,6 +828,7 @@ for author_handle in $AUTHOR_HANDLE_SET; do
|
|||||||
#
|
#
|
||||||
LOCATION_COMMON_NAME=$("$LOCATION_TOOL" -c "$LOCATION_CODE" 2>/dev/null)
|
LOCATION_COMMON_NAME=$("$LOCATION_TOOL" -c "$LOCATION_CODE" 2>/dev/null)
|
||||||
status="$?"
|
status="$?"
|
||||||
|
export LOCATION_COMMON_NAME
|
||||||
if [[ $status -ne 0 ]]; then
|
if [[ $status -ne 0 ]]; then
|
||||||
echo "$0: ERROR: cannot determine location common name" \
|
echo "$0: ERROR: cannot determine location common name" \
|
||||||
"for location ISO 3166 code: $LOCATION_CODE" 1>&2
|
"for location ISO 3166 code: $LOCATION_CODE" 1>&2
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ shopt -s globstar # enable '**' to match all files and zero or more directories
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.2.2 2024-03-19"
|
export VERSION="1.2.3 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -244,9 +244,6 @@ if [[ $# -ne 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
export ENTRY_PATH="$1"
|
export ENTRY_PATH="$1"
|
||||||
if [[ $V_FLAG -ge 1 ]]; then
|
|
||||||
echo "$0: debug[1]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# verify that we have a topdir directory
|
# verify that we have a topdir directory
|
||||||
#
|
#
|
||||||
@@ -372,6 +369,7 @@ if [[ ! -s $DOT_PATH ]]; then
|
|||||||
exit 7
|
exit 7
|
||||||
fi
|
fi
|
||||||
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
||||||
|
export DOT_PATH_CONTENT
|
||||||
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
||||||
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
||||||
exit 7
|
exit 7
|
||||||
@@ -438,6 +436,7 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
echo "$0: debug[3]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
||||||
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
||||||
echo "$0: debug[3]: INC_PATH=$INC_PATH" 1>&2
|
echo "$0: debug[3]: INC_PATH=$INC_PATH" 1>&2
|
||||||
@@ -450,6 +449,7 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
||||||
echo "$0: debug[3]: YYYY_DIR=$YYYY_DIR" 1>&2
|
echo "$0: debug[3]: YYYY_DIR=$YYYY_DIR" 1>&2
|
||||||
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
||||||
|
echo "$0: debug[3]: DOT_PATH_CONTENT=$DOT_PATH_CONTENT" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
||||||
echo "$0: debug[3]: MANIFEST_ENTRY_JSON_AWK=$MANIFEST_ENTRY_JSON_AWK" 1>&2
|
echo "$0: debug[3]: MANIFEST_ENTRY_JSON_AWK=$MANIFEST_ENTRY_JSON_AWK" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -465,7 +465,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary markdown for pandoc to process
|
# create a temporary markdown for pandoc to process
|
||||||
#
|
#
|
||||||
TMP_FILE=".$NAME.$$.md"
|
export TMP_FILE=".$NAME.$$.md"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary markdown file: $TMP_FILE" 1>&2
|
echo "$0: debug[3]: temporary markdown file: $TMP_FILE" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -487,7 +487,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary manifest file
|
# create a temporary manifest file
|
||||||
#
|
#
|
||||||
TMP_MANIFEST=".$NAME.$$.manifest"
|
export TMP_MANIFEST=".$NAME.$$.manifest"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary manifest file: $TMP_MANIFEST" 1>&2
|
echo "$0: debug[3]: temporary manifest file: $TMP_MANIFEST" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.1.1 2024-03-19"
|
export VERSION="1.1.2 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -190,6 +190,7 @@ $NAME version: $VERSION"
|
|||||||
function output_award
|
function output_award
|
||||||
{
|
{
|
||||||
local ENTRY_JSON_PATH; # the .entry.json path
|
local ENTRY_JSON_PATH; # the .entry.json path
|
||||||
|
local AWARD_STRING; # winning entry award string
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
#
|
#
|
||||||
@@ -213,12 +214,12 @@ function output_award
|
|||||||
|
|
||||||
# obtain the award string
|
# obtain the award string
|
||||||
#
|
#
|
||||||
AWARD=$(grep -F '"award" : "' "$ENTRY_JSON_PATH" | sed -e 's/^.*"award" : "//' -e 's/",//')
|
AWARD_STRING=$(grep -F '"award" : "' "$ENTRY_JSON_PATH" | sed -e 's/^.*"award" : "//' -e 's/",//')
|
||||||
if [[ -z $AWARD ]]; then
|
if [[ -z $AWARD_STRING ]]; then
|
||||||
echo "$0: ERROR: in output_award: no award found in .entry.json file: $ENTRY_JSON_PATH" 1>&2
|
echo "$0: ERROR: in output_award: no award found in .entry.json file: $ENTRY_JSON_PATH" 1>&2
|
||||||
return 5
|
return 5
|
||||||
fi
|
fi
|
||||||
echo "$AWARD"
|
echo "$AWARD_STRING"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,9 +365,6 @@ if [[ $# -ne 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
export YYYY="$1"
|
export YYYY="$1"
|
||||||
if [[ $V_FLAG -ge 1 ]]; then
|
|
||||||
echo "$0: debug[1]: YYYY=$YYYY" 1>&2
|
|
||||||
fi
|
|
||||||
if [[ -z $YYYY ]]; then
|
if [[ -z $YYYY ]]; then
|
||||||
echo "$0: ERROR: YYYY arg is empty" 1>&2
|
echo "$0: ERROR: YYYY arg is empty" 1>&2
|
||||||
exit 3
|
exit 3
|
||||||
@@ -484,6 +482,7 @@ fi
|
|||||||
# determine The N-th IOCCC string
|
# determine The N-th IOCCC string
|
||||||
#
|
#
|
||||||
LINE_NUM=$(sed -n "/$YYYY/=" "$TOP_FILE" | head -1)
|
LINE_NUM=$(sed -n "/$YYYY/=" "$TOP_FILE" | head -1)
|
||||||
|
export LINE_NUM
|
||||||
if [[ -z $LINE_NUM ]]; then
|
if [[ -z $LINE_NUM ]]; then
|
||||||
echo "$0: ERROR: cannot determine line number in $TOP_FILE for year: $YYYY" 1>&2
|
echo "$0: ERROR: cannot determine line number in $TOP_FILE for year: $YYYY" 1>&2
|
||||||
exit 10
|
exit 10
|
||||||
@@ -505,12 +504,12 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
||||||
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
||||||
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
||||||
echo "$0: debug[3]: URL=$URL" 1>&2
|
|
||||||
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
|
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: YYYY=$YYYY" 1>&2
|
echo "$0: debug[3]: YYYY=$YYYY" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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]: TOP_FILE=$TOP_FILE" 1>&2
|
echo "$0: debug[3]: TOP_FILE=$TOP_FILE" 1>&2
|
||||||
echo "$0: debug[3]: YEAR_FILE=$YEAR_FILE" 1>&2
|
echo "$0: debug[3]: YEAR_FILE=$YEAR_FILE" 1>&2
|
||||||
echo "$0: debug[3]: LINE_NUM=$LINE_NUM" 1>&2
|
echo "$0: debug[3]: LINE_NUM=$LINE_NUM" 1>&2
|
||||||
@@ -528,7 +527,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary markdown for pandoc to process
|
# create a temporary markdown for pandoc to process
|
||||||
#
|
#
|
||||||
TMP_FILE=".$NAME.$$.md"
|
export TMP_FILE=".$NAME.$$.md"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary markdown file: $TMP_FILE" 1>&2
|
echo "$0: debug[3]: temporary markdown file: $TMP_FILE" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -612,6 +611,7 @@ for YYYY_DIR in $(< "$YEAR_FILE"); do
|
|||||||
exit 7
|
exit 7
|
||||||
fi
|
fi
|
||||||
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
||||||
|
export DOT_PATH_CONTENT
|
||||||
if [[ $YYYY_DIR != "$DOT_PATH_CONTENT" ]]; then
|
if [[ $YYYY_DIR != "$DOT_PATH_CONTENT" ]]; then
|
||||||
echo "$0: ERROR: arg: $YYYY_DIR does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
echo "$0: ERROR: arg: $YYYY_DIR does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
||||||
exit 7
|
exit 7
|
||||||
@@ -633,6 +633,7 @@ for YYYY_DIR in $(< "$YEAR_FILE"); do
|
|||||||
# determine the award for this entry
|
# determine the award for this entry
|
||||||
#
|
#
|
||||||
AWARD=$(output_award "$ENTRY_JSON")
|
AWARD=$(output_award "$ENTRY_JSON")
|
||||||
|
export AWARD
|
||||||
if [[ -z $AWARD ]]; then
|
if [[ -z $AWARD ]]; then
|
||||||
echo "$0: ERROR: cannot find award in .entry.json: $ENTRY_JSON" 1>&2
|
echo "$0: ERROR: cannot find award in .entry.json: $ENTRY_JSON" 1>&2
|
||||||
exit 7
|
exit 7
|
||||||
|
|||||||
+10
-5
@@ -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
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.5.2 2024-03-19"
|
export VERSION="1.5.3 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -117,6 +117,7 @@ if [[ $status -eq 0 ]]; then
|
|||||||
fi
|
fi
|
||||||
export TOPDIR
|
export TOPDIR
|
||||||
PANDOC_TOOL=$(type -P pandoc)
|
PANDOC_TOOL=$(type -P pandoc)
|
||||||
|
export PANDOC_TOOL
|
||||||
if [[ -z $PANDOC_TOOL ]]; then
|
if [[ -z $PANDOC_TOOL ]]; then
|
||||||
PANDOC_TOOL="/opt/homebrew/bin/pandoc"
|
PANDOC_TOOL="/opt/homebrew/bin/pandoc"
|
||||||
fi
|
fi
|
||||||
@@ -237,10 +238,6 @@ fi
|
|||||||
#
|
#
|
||||||
export MARKDOWN_INPUT="$1"
|
export MARKDOWN_INPUT="$1"
|
||||||
export HTML_OUTPUT="$2"
|
export HTML_OUTPUT="$2"
|
||||||
if [[ $V_FLAG -ge 1 ]]; then
|
|
||||||
echo "$0: debug[1]: MARKDOWN_INPUT=$MARKDOWN_INPUT" 1>&2
|
|
||||||
echo "$0: debug[1]: HTML_OUTPUT=$HTML_OUTPUT" 1>&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# firewall - validate args
|
# firewall - validate args
|
||||||
#
|
#
|
||||||
@@ -280,6 +277,7 @@ export PANDOC_MIN_VERSION="3.1.12.2"
|
|||||||
# verify that we have a topdir directory
|
# verify that we have a topdir directory
|
||||||
#
|
#
|
||||||
REPO_NAME=$(basename "$REPO_URL")
|
REPO_NAME=$(basename "$REPO_URL")
|
||||||
|
export REPO_NAME
|
||||||
if [[ -z $TOPDIR ]]; then
|
if [[ -z $TOPDIR ]]; then
|
||||||
echo "$0: ERROR: cannot find top of git repo directory" 1>&2
|
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_URL; cd $REPO_NAME" 1>&2
|
||||||
@@ -355,6 +353,10 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: PANDOC_TOOL=$PANDOC_TOOL" 1>&2
|
echo "$0: debug[3]: PANDOC_TOOL=$PANDOC_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
||||||
|
echo "$0: debug[3]: PANDOC_TOOL=$PANDOC_TOOL" 1>&2
|
||||||
|
for index in "${!PANDOC_OPTION[@]}"; do
|
||||||
|
echo "$0: debug[3]: PANDOC_OPTION[$index]=${PANDOC_OPTION[$index]}" 1>&2
|
||||||
|
done
|
||||||
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
@@ -362,6 +364,8 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: HTML_OUTPUT=$HTML_OUTPUT" 1>&2
|
echo "$0: debug[3]: HTML_OUTPUT=$HTML_OUTPUT" 1>&2
|
||||||
echo "$0: debug[3]: PANDOC_TOOL_VERSION=$PANDOC_TOOL_VERSION" 1>&2
|
echo "$0: debug[3]: PANDOC_TOOL_VERSION=$PANDOC_TOOL_VERSION" 1>&2
|
||||||
echo "$0: debug[3]: PANDOC_MIN_VERSION=$PANDOC_MIN_VERSION" 1>&2
|
echo "$0: debug[3]: PANDOC_MIN_VERSION=$PANDOC_MIN_VERSION" 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]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
echo "$0: debug[3]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
||||||
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
||||||
echo "$0: debug[3]: INC_PATH=$INC_PATH" 1>&2
|
echo "$0: debug[3]: INC_PATH=$INC_PATH" 1>&2
|
||||||
@@ -382,6 +386,7 @@ fi
|
|||||||
# verify that the pandoc version is >= the minimum version
|
# verify that the pandoc version is >= the minimum version
|
||||||
#
|
#
|
||||||
FIRST_VERSION=$(printf "%s\n%s" "$PANDOC_TOOL_VERSION" "$PANDOC_MIN_VERSION" | LC_ALL=C sort -V | head -1)
|
FIRST_VERSION=$(printf "%s\n%s" "$PANDOC_TOOL_VERSION" "$PANDOC_MIN_VERSION" | LC_ALL=C sort -V | head -1)
|
||||||
|
export FIRST_VERSION
|
||||||
if [[ $FIRST_VERSION != "$PANDOC_MIN_VERSION" ]]; then
|
if [[ $FIRST_VERSION != "$PANDOC_MIN_VERSION" ]]; then
|
||||||
echo "$0: ERROR: pandoc: $PANDOC_TOOL version: $PANDOC_TOOL_VERSION <=" \
|
echo "$0: ERROR: pandoc: $PANDOC_TOOL version: $PANDOC_TOOL_VERSION <=" \
|
||||||
"minimum allowed: $PANDOC_MIN_VERSION" 1>&2
|
"minimum allowed: $PANDOC_MIN_VERSION" 1>&2
|
||||||
|
|||||||
@@ -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
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.1.2 2024-03-08"
|
export VERSION="1.1.3 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -282,9 +282,6 @@ if [[ $# -ne 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
export ENTRY_PATH="$1"
|
export ENTRY_PATH="$1"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
|
||||||
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# always add the '-v level' option, unless level is empty, to the set of options passed to the md2html.sh tool
|
# always add the '-v level' option, unless level is empty, to the set of options passed to the md2html.sh tool
|
||||||
#
|
#
|
||||||
@@ -397,6 +394,7 @@ if [[ ! -s $DOT_PATH ]]; then
|
|||||||
exit 7
|
exit 7
|
||||||
fi
|
fi
|
||||||
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
||||||
|
export DOT_PATH_CONTENT
|
||||||
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
||||||
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
||||||
exit 7
|
exit 7
|
||||||
@@ -488,6 +486,7 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
||||||
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
||||||
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
|
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
|
||||||
|
echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2
|
||||||
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
|
echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2
|
||||||
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
|
echo "$0: debug[3]: PANDOC_WRAPPER=$PANDOC_WRAPPER" 1>&2
|
||||||
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
||||||
@@ -495,16 +494,20 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
|
||||||
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
|
||||||
echo "$0: debug[3]: ENTRY_DIR=$ENTRY_DIR" 1>&2
|
|
||||||
for index in "${!TOOL_OPTION[@]}"; do
|
for index in "${!TOOL_OPTION[@]}"; do
|
||||||
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
||||||
done
|
done
|
||||||
|
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
||||||
echo "$0: debug[3]: YYYY_DIR=$YYYY_DIR" 1>&2
|
echo "$0: debug[3]: CD_FAILED=$CD_FAILED" 1>&2
|
||||||
|
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
||||||
|
echo "$0: debug[3]: ENTRY_DIR=$ENTRY_DIR" 1>&2
|
||||||
|
echo "$0: debug[3]: ENTRY_ID=$ENTRY_ID" 1>&2
|
||||||
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
||||||
|
echo "$0: debug[3]: YYYY_DIR=$YYYY_DIR" 1>&2
|
||||||
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
||||||
|
echo "$0: debug[3]: DOT_PATH_CONTENT=$DOT_PATH_CONTENT" 1>&2
|
||||||
|
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
||||||
echo "$0: debug[3]: README_PATH=$README_PATH" 1>&2
|
echo "$0: debug[3]: README_PATH=$README_PATH" 1>&2
|
||||||
echo "$0: debug[3]: INDEX_PATH=$INDEX_PATH" 1>&2
|
echo "$0: debug[3]: INDEX_PATH=$INDEX_PATH" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
||||||
|
|||||||
+11
-8
@@ -86,7 +86,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.2.1 2024-02-23"
|
export VERSION="1.2.2 2024-02-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -275,9 +275,6 @@ if [[ $# -ne 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
export ENTRY_PATH="$1"
|
export ENTRY_PATH="$1"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
|
||||||
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# always add the '-v level' option, unless level is empty, to the set of options passed to the md2html.sh tool
|
# always add the '-v level' option, unless level is empty, to the set of options passed to the md2html.sh tool
|
||||||
#
|
#
|
||||||
@@ -390,6 +387,7 @@ if [[ ! -s $DOT_PATH ]]; then
|
|||||||
exit 7
|
exit 7
|
||||||
fi
|
fi
|
||||||
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
||||||
|
export DOT_PATH_CONTENT
|
||||||
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
||||||
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
||||||
exit 7
|
exit 7
|
||||||
@@ -488,18 +486,23 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
|
||||||
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
|
||||||
echo "$0: debug[3]: ENTRY_DIR=$ENTRY_DIR" 1>&2
|
|
||||||
for index in "${!TOOL_OPTION[@]}"; do
|
for index in "${!TOOL_OPTION[@]}"; do
|
||||||
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
echo "$0: debug[3]: TOOL_OPTION[$index]=${TOOL_OPTION[$index]}" 1>&2
|
||||||
done
|
done
|
||||||
|
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
||||||
echo "$0: debug[3]: YYYY_DIR=$YYYY_DIR" 1>&2
|
echo "$0: debug[3]: CD_FAILED=$CD_FAILED" 1>&2
|
||||||
|
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
||||||
|
echo "$0: debug[3]: ENTRY_DIR=$ENTRY_DIR" 1>&2
|
||||||
|
echo "$0: debug[3]: ENTRY_ID=$ENTRY_ID" 1>&2
|
||||||
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
||||||
|
echo "$0: debug[3]: YYYY_DIR=$YYYY_DIR" 1>&2
|
||||||
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
||||||
|
echo "$0: debug[3]: DOT_PATH_CONTENT=$DOT_PATH_CONTENT" 1>&2
|
||||||
|
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
||||||
echo "$0: debug[3]: README_PATH=$README_PATH" 1>&2
|
echo "$0: debug[3]: README_PATH=$README_PATH" 1>&2
|
||||||
echo "$0: debug[3]: INDEX_PATH=$INDEX_PATH" 1>&2
|
echo "$0: debug[3]: INDEX_PATH=$INDEX_PATH" 1>&2
|
||||||
|
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -N stops early before any processing is performed
|
# -N stops early before any processing is performed
|
||||||
|
|||||||
@@ -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
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.1.2 2024-03-18"
|
export VERSION="1.1.3 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -206,9 +206,6 @@ if [[ $# -ne 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
export ENTRY_PATH="$1"
|
export ENTRY_PATH="$1"
|
||||||
if [[ $V_FLAG -ge 1 ]]; then
|
|
||||||
echo "$0: debug[1]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# verify that we have a topdir directory
|
# verify that we have a topdir directory
|
||||||
#
|
#
|
||||||
@@ -326,6 +323,7 @@ if [[ ! -s $DOT_PATH ]]; then
|
|||||||
exit 7
|
exit 7
|
||||||
fi
|
fi
|
||||||
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
||||||
|
export DOT_PATH_CONTENT
|
||||||
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
||||||
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
||||||
exit 7
|
exit 7
|
||||||
@@ -375,13 +373,17 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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]: BIN_PATH=$BIN_PATH" 1>&2
|
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
||||||
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
||||||
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_DIR=$ENTRY_DIR" 1>&2
|
echo "$0: debug[3]: ENTRY_DIR=$ENTRY_DIR" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_ID=$ENTRY_ID" 1>&2
|
echo "$0: debug[3]: ENTRY_ID=$ENTRY_ID" 1>&2
|
||||||
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
||||||
|
echo "$0: debug[3]: YYYY_DIR=$YYYY_DIR" 1>&2
|
||||||
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
||||||
|
echo "$0: debug[3]: DOT_PATH_CONTENT=$DOT_PATH_CONTENT" 1>&2
|
||||||
|
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
||||||
echo "$0: debug[3]: GITIGNORE=$GITIGNORE" 1>&2
|
echo "$0: debug[3]: GITIGNORE=$GITIGNORE" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -396,7 +398,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary markdown for pandoc to process
|
# create a temporary markdown for pandoc to process
|
||||||
#
|
#
|
||||||
TMP_FILE="$ENTRY_PATH/.$NAME.$$.sgi.sh"
|
export TMP_FILE="$ENTRY_PATH/.$NAME.$$.sgi.sh"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary markdown file: $TMP_FILE" 1>&2
|
echo "$0: debug[3]: temporary markdown file: $TMP_FILE" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
+4
-2
@@ -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
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.1.1 2024-03-19"
|
export VERSION="1.1.2 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -346,6 +346,7 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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]: BIN_PATH=$BIN_PATH" 1>&2
|
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
||||||
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
||||||
echo "$0: debug[3]: STATUS_JSON=$STATUS_JSON" 1>&2
|
echo "$0: debug[3]: STATUS_JSON=$STATUS_JSON" 1>&2
|
||||||
@@ -362,7 +363,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary markdown for pandoc to process
|
# create a temporary markdown for pandoc to process
|
||||||
#
|
#
|
||||||
TMP_FILE=".$NAME.$$.md"
|
export TMP_FILE=".$NAME.$$.md"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary markdown file: $TMP_FILE" 1>&2
|
echo "$0: debug[3]: temporary markdown file: $TMP_FILE" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -386,6 +387,7 @@ fi
|
|||||||
#
|
#
|
||||||
CONTEST_STATUS=$(grep '"contest_status"\s*:\s*"[^"][^"]*"' "$STATUS_JSON" | sed -e 's/",\s*$//' -e 's/^.*"//')
|
CONTEST_STATUS=$(grep '"contest_status"\s*:\s*"[^"][^"]*"' "$STATUS_JSON" | sed -e 's/",\s*$//' -e 's/^.*"//')
|
||||||
status="$?"
|
status="$?"
|
||||||
|
export CONTEST_STATUS
|
||||||
if [[ $status -ne 0 || -z $CONTEST_STATUS ]]; then
|
if [[ $status -ne 0 || -z $CONTEST_STATUS ]]; then
|
||||||
echo "$0: ERROR: cannot determine contest_status from status.json: $STATUS_JSON" 1>&2
|
echo "$0: ERROR: cannot determine contest_status from status.json: $STATUS_JSON" 1>&2
|
||||||
exit 8
|
exit 8
|
||||||
|
|||||||
@@ -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
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.2.1 2024-02-23"
|
export VERSION="1.2.2 2024-02-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -227,6 +227,7 @@ fi
|
|||||||
# form Nu Html Checker doc url string
|
# form Nu Html Checker doc url string
|
||||||
#
|
#
|
||||||
VALIDATOR_ENCODED_URL=$(echo "$URL" | sed -e 's;/;%2F;g' -e 's;:;%3A;')
|
VALIDATOR_ENCODED_URL=$(echo "$URL" | sed -e 's;/;%2F;g' -e 's;:;%3A;')
|
||||||
|
export VALIDATOR_ENCODED_URL
|
||||||
|
|
||||||
# parameter debugging
|
# parameter debugging
|
||||||
#
|
#
|
||||||
@@ -234,6 +235,7 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: VERSION=$VERSION" 1>&2
|
echo "$0: debug[3]: VERSION=$VERSION" 1>&2
|
||||||
echo "$0: debug[3]: NAME=$NAME" 1>&2
|
echo "$0: debug[3]: NAME=$NAME" 1>&2
|
||||||
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
||||||
|
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
||||||
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
||||||
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.3.1 2024-03-19"
|
export VERSION="1.3.2 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -180,6 +180,7 @@ $NAME version: $VERSION"
|
|||||||
function output_award
|
function output_award
|
||||||
{
|
{
|
||||||
local ENTRY_JSON_PATH; # the .entry.json path
|
local ENTRY_JSON_PATH; # the .entry.json path
|
||||||
|
local AWARD_STRING; # winning entry award string
|
||||||
|
|
||||||
# parse args
|
# parse args
|
||||||
#
|
#
|
||||||
@@ -203,12 +204,12 @@ function output_award
|
|||||||
|
|
||||||
# obtain the award string
|
# obtain the award string
|
||||||
#
|
#
|
||||||
AWARD=$(grep -F '"award" : "' "$ENTRY_JSON_PATH" | sed -e 's/^.*"award" : "//' -e 's/",//')
|
AWARD_STRING=$(grep -F '"award" : "' "$ENTRY_JSON_PATH" | sed -e 's/^.*"award" : "//' -e 's/",//')
|
||||||
if [[ -z $AWARD ]]; then
|
if [[ -z $AWARD_STRING ]]; then
|
||||||
echo "$0: ERROR: in output_award: no award found in .entry.json file: $ENTRY_JSON_PATH" 1>&2
|
echo "$0: ERROR: in output_award: no award found in .entry.json file: $ENTRY_JSON_PATH" 1>&2
|
||||||
return 5
|
return 5
|
||||||
fi
|
fi
|
||||||
echo "$AWARD"
|
echo "$AWARD_STRING"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -291,9 +292,6 @@ if [[ $# -ne 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
export ENTRY_PATH="$1"
|
export ENTRY_PATH="$1"
|
||||||
if [[ $V_FLAG -ge 1 ]]; then
|
|
||||||
echo "$0: debug[1]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# verify that we have a topdir directory
|
# verify that we have a topdir directory
|
||||||
#
|
#
|
||||||
@@ -419,6 +417,7 @@ if [[ ! -s $DOT_PATH ]]; then
|
|||||||
exit 7
|
exit 7
|
||||||
fi
|
fi
|
||||||
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
||||||
|
export DOT_PATH_CONTENT
|
||||||
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
||||||
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
||||||
exit 7
|
exit 7
|
||||||
@@ -456,11 +455,11 @@ fi
|
|||||||
# determine award
|
# determine award
|
||||||
#
|
#
|
||||||
AWARD=$(output_award "$ENTRY_JSON")
|
AWARD=$(output_award "$ENTRY_JSON")
|
||||||
|
export AWARD
|
||||||
if [[ -z $AWARD ]]; then
|
if [[ -z $AWARD ]]; then
|
||||||
echo "$0: ERROR: cannot determine award for $YEAR_DIR from: $ENTRY_JSON" 1>&2
|
echo "$0: ERROR: cannot determine award for $YEAR_DIR from: $ENTRY_JSON" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
export AWARD
|
|
||||||
|
|
||||||
# parameter debugging
|
# parameter debugging
|
||||||
#
|
#
|
||||||
@@ -468,15 +467,16 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: VERSION=$VERSION" 1>&2
|
echo "$0: debug[3]: VERSION=$VERSION" 1>&2
|
||||||
echo "$0: debug[3]: NAME=$NAME" 1>&2
|
echo "$0: debug[3]: NAME=$NAME" 1>&2
|
||||||
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
||||||
|
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
||||||
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
||||||
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
||||||
echo "$0: debug[3]: URL=$URL" 1>&2
|
|
||||||
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
|
echo "$0: debug[3]: SITE_URL=$SITE_URL" 1>&2
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
echo "$0: debug[3]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
||||||
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
||||||
echo "$0: debug[3]: INC_PATH=$INC_PATH" 1>&2
|
echo "$0: debug[3]: INC_PATH=$INC_PATH" 1>&2
|
||||||
@@ -489,8 +489,10 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
||||||
echo "$0: debug[3]: YYYY_DIR=$YYYY_DIR" 1>&2
|
echo "$0: debug[3]: YYYY_DIR=$YYYY_DIR" 1>&2
|
||||||
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
||||||
|
echo "$0: debug[3]: DOT_PATH_CONTENT=$DOT_PATH_CONTENT" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_NAVBAR_AWK=$ENTRY_NAVBAR_AWK" 1>&2
|
echo "$0: debug[3]: ENTRY_NAVBAR_AWK=$ENTRY_NAVBAR_AWK" 1>&2
|
||||||
|
echo "$0: debug[3]: AWARD=$AWARD" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If -N, time to exit
|
# If -N, time to exit
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.1.1 2024-03-19"
|
export VERSION="1.1.2 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -302,9 +302,6 @@ if [[ $# -ne 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
export YEAR_ARG="$1"
|
export YEAR_ARG="$1"
|
||||||
if [[ $V_FLAG -ge 1 ]]; then
|
|
||||||
echo "$0: debug[1]: YEAR_ARG=$YEAR_ARG" 1>&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# verify that we have a topdir directory
|
# verify that we have a topdir directory
|
||||||
#
|
#
|
||||||
@@ -455,20 +452,22 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: VERSION=$VERSION" 1>&2
|
echo "$0: debug[3]: VERSION=$VERSION" 1>&2
|
||||||
echo "$0: debug[3]: NAME=$NAME" 1>&2
|
echo "$0: debug[3]: NAME=$NAME" 1>&2
|
||||||
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
||||||
|
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
||||||
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2
|
||||||
echo "$0: debug[3]: REPO_URL=$REPO_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]: SITE_URL=$SITE_URL" 1>&2
|
||||||
echo "$0: debug[3]: URL=$URL" 1>&2
|
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
|
echo "$0: debug[3]: YEAR_ARG=$YEAR_ARG" 1>&2
|
||||||
|
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 1>&2
|
||||||
echo "$0: debug[3]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
echo "$0: debug[3]: AUTHOR_PATH=$AUTHOR_PATH" 1>&2
|
||||||
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
echo "$0: debug[3]: AUTHOR_DIR=$AUTHOR_DIR" 1>&2
|
||||||
echo "$0: debug[3]: INC_PATH=$INC_PATH" 1>&2
|
echo "$0: debug[3]: INC_PATH=$INC_PATH" 1>&2
|
||||||
echo "$0: debug[3]: INC_DIR=$INC_DIR" 1>&2
|
echo "$0: debug[3]: INC_DIR=$INC_DIR" 1>&2
|
||||||
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
||||||
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
||||||
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
echo "$0: debug[3]: CD_FAILED=$CD_FAILED" 1>&2
|
||||||
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
||||||
echo "$0: debug[3]: TOP_FILE=$TOP_FILE" 1>&2
|
echo "$0: debug[3]: TOP_FILE=$TOP_FILE" 1>&2
|
||||||
echo "$0: debug[3]: YEAR_NAVBAR_AWK=$YEAR_NAVBAR_AWK" 1>&2
|
echo "$0: debug[3]: YEAR_NAVBAR_AWK=$YEAR_NAVBAR_AWK" 1>&2
|
||||||
|
|||||||
+9
-9
@@ -83,7 +83,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.1.1 2024-03-18"
|
export VERSION="1.1.2 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -353,22 +353,22 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: NAME=$NAME" 1>&2
|
echo "$0: debug[3]: NAME=$NAME" 1>&2
|
||||||
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
||||||
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2
|
|
||||||
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
||||||
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
||||||
|
echo "$0: debug[3]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
|
||||||
|
echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
|
|
||||||
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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]: BIN_PATH=$BIN_PATH" 1>&2
|
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
||||||
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
||||||
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
|
||||||
echo "$0: debug[3]: TARBALL=$TARBALL" 1>&2
|
echo "$0: debug[3]: TARBALL=$TARBALL" 1>&2
|
||||||
echo "$0: debug[3]: FILELIST_ENTRY_JSON_AWK=$FILELIST_ENTRY_JSON_AWK" 1>&2
|
echo "$0: debug[3]: FILELIST_ENTRY_JSON_AWK=$FILELIST_ENTRY_JSON_AWK" 1>&2
|
||||||
echo "$0: debug[3]: IOCCC_CSS=$IOCCC_CSS" 1>&2
|
echo "$0: debug[3]: IOCCC_CSS=$IOCCC_CSS" 1>&2
|
||||||
echo "$0: debug[3]: VAR_MK=$VAR_MK" 1>&2
|
echo "$0: debug[3]: VAR_MK=$VAR_MK" 1>&2
|
||||||
echo "$0: debug[3]: FILELIST=$FILELIST" 1>&2
|
echo "$0: debug[3]: TOP_FILE=$TOP_FILE" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If -N, time to exit
|
# If -N, time to exit
|
||||||
@@ -382,7 +382,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary file manifest list
|
# create a temporary file manifest list
|
||||||
#
|
#
|
||||||
TMP_MANIFEST_LIST=".$NAME.$$.manifest.list"
|
export TMP_MANIFEST_LIST=".$NAME.$$.manifest.list"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary file manifest list: $TMP_MANIFEST_LIST" 1>&2
|
echo "$0: debug[3]: temporary file manifest list: $TMP_MANIFEST_LIST" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -404,7 +404,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary sort list of files to tar
|
# create a temporary sort list of files to tar
|
||||||
#
|
#
|
||||||
TMP_TAR_LIST=".$NAME.$$.tar.list"
|
export TMP_TAR_LIST=".$NAME.$$.tar.list"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary file tar list: $TMP_TAR_LIST" 1>&2
|
echo "$0: debug[3]: temporary file tar list: $TMP_TAR_LIST" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -429,7 +429,7 @@ fi
|
|||||||
# It is a pain to set the EXIT_CODE deep inside a loop, so we write the EXIT_CODE into a file
|
# It is a pain to set the EXIT_CODE deep inside a loop, so we write the EXIT_CODE into a file
|
||||||
# and read the file (setting EXIT_CODE again) after the loop. A hack, but good enough for our needs.
|
# and read the file (setting EXIT_CODE again) after the loop. A hack, but good enough for our needs.
|
||||||
#
|
#
|
||||||
TMP_EXIT_CODE=".$NAME.$$.exit.code"
|
export TMP_EXIT_CODE=".$NAME.$$.exit.code"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary exit code: $TMP_EXIT_CODE" 1>&2
|
echo "$0: debug[3]: temporary exit code: $TMP_EXIT_CODE" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -451,7 +451,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary tarball
|
# create a temporary tarball
|
||||||
#
|
#
|
||||||
TMP_TARBALL=".$NAME.$$.tar.bz2"
|
export TMP_TARBALL=".$NAME.$$.tar.bz2"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary tarball: $TMP_TARBALL" 1>&2
|
echo "$0: debug[3]: temporary tarball: $TMP_TARBALL" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
+12
-5
@@ -83,7 +83,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.3.1 2024-03-25"
|
export VERSION="1.3.2 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -320,6 +320,7 @@ if [[ ! -s $DOT_PATH ]]; then
|
|||||||
exit 5
|
exit 5
|
||||||
fi
|
fi
|
||||||
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
DOT_PATH_CONTENT=$(< "$DOT_PATH")
|
||||||
|
export DOT_PATH_CONTENT
|
||||||
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
if [[ $ENTRY_PATH != "$DOT_PATH_CONTENT" ]]; then
|
||||||
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
echo "$0: ERROR: arg: $ENTRY_PATH does not match $DOT_PATH contents: $DOT_PATH_CONTENT" 1>&2
|
||||||
exit 5
|
exit 5
|
||||||
@@ -473,21 +474,25 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: NAME=$NAME" 1>&2
|
echo "$0: debug[3]: NAME=$NAME" 1>&2
|
||||||
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
||||||
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2
|
|
||||||
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
||||||
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
||||||
|
echo "$0: debug[3]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
|
||||||
|
echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
|
|
||||||
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
|
||||||
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
||||||
|
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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]: BIN_PATH=$BIN_PATH" 1>&2
|
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
||||||
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
||||||
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_DIR=$ENTRY_DIR" 1>&2
|
echo "$0: debug[3]: ENTRY_DIR=$ENTRY_DIR" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_ID=$ENTRY_ID" 1>&2
|
echo "$0: debug[3]: ENTRY_ID=$ENTRY_ID" 1>&2
|
||||||
|
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
||||||
|
echo "$0: debug[3]: YYYY_DIR=$YYYY_DIR" 1>&2
|
||||||
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
|
||||||
|
echo "$0: debug[3]: DOT_PATH_CONTENT=$DOT_PATH_CONTENT" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
|
||||||
echo "$0: debug[3]: FILELIST_ENTRY_JSON_AWK=$FILELIST_ENTRY_JSON_AWK" 1>&2
|
echo "$0: debug[3]: FILELIST_ENTRY_JSON_AWK=$FILELIST_ENTRY_JSON_AWK" 1>&2
|
||||||
echo "$0: debug[3]: IOCCC_CSS=$IOCCC_CSS" 1>&2
|
echo "$0: debug[3]: IOCCC_CSS=$IOCCC_CSS" 1>&2
|
||||||
@@ -695,7 +700,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary tarball
|
# create a temporary tarball
|
||||||
#
|
#
|
||||||
TMP_TARBALL=".$NAME.$$.tar.bz2"
|
export TMP_TARBALL=".$NAME.$$.tar.bz2"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary tarball: $TMP_TARBALL" 1>&2
|
echo "$0: debug[3]: temporary tarball: $TMP_TARBALL" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -764,6 +769,7 @@ if [[ -z $REBUILD_TARBALL ]]; then
|
|||||||
fi
|
fi
|
||||||
TAR_CONTENTS_DIFFERS=$(TZ=UTC LC_ALL=C "$GTAR_TOOL" --compare --file="$TARBALL" -C . 2>&1 | \
|
TAR_CONTENTS_DIFFERS=$(TZ=UTC LC_ALL=C "$GTAR_TOOL" --compare --file="$TARBALL" -C . 2>&1 | \
|
||||||
grep -E -v ': (Uid|Gid|Mod time) differs$')
|
grep -E -v ': (Uid|Gid|Mod time) differs$')
|
||||||
|
export TAR_CONTENTS_DIFFERS
|
||||||
if [[ -n $TAR_CONTENTS_DIFFERS ]]; then
|
if [[ -n $TAR_CONTENTS_DIFFERS ]]; then
|
||||||
REBUILD_TARBALL="true"
|
REBUILD_TARBALL="true"
|
||||||
if [[ $V_FLAG -ge 1 ]]; then
|
if [[ $V_FLAG -ge 1 ]]; then
|
||||||
@@ -794,6 +800,7 @@ if [[ -n $REBUILD_TARBALL ]]; then
|
|||||||
#
|
#
|
||||||
TAR_TIMESTAMP=$(TZ=UTZ date '+%s')
|
TAR_TIMESTAMP=$(TZ=UTZ date '+%s')
|
||||||
status="$?"
|
status="$?"
|
||||||
|
export TAR_TIMESTAMP
|
||||||
if [[ $status -ne 0 ]]; then
|
if [[ $status -ne 0 ]]; then
|
||||||
echo "$0: ERROR: new TZ=UTC date +%s failed, error: $status" 1>&2
|
echo "$0: ERROR: new TZ=UTC date +%s failed, error: $status" 1>&2
|
||||||
exit 8
|
exit 8
|
||||||
|
|||||||
+9
-8
@@ -83,7 +83,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.1.1 2024-03-18"
|
export VERSION="1.1.2 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -357,17 +357,18 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: NAME=$NAME" 1>&2
|
echo "$0: debug[3]: NAME=$NAME" 1>&2
|
||||||
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
||||||
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2
|
|
||||||
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
||||||
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
||||||
|
echo "$0: debug[3]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
|
||||||
|
echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
|
|
||||||
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2
|
||||||
|
echo "$0: debug[3]: YYYY=$YYYY" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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]: BIN_PATH=$BIN_PATH" 1>&2
|
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
|
||||||
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
|
||||||
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
|
||||||
echo "$0: debug[3]: TARBALL=$TARBALL" 1>&2
|
echo "$0: debug[3]: TARBALL=$TARBALL" 1>&2
|
||||||
echo "$0: debug[3]: FILELIST_ENTRY_JSON_AWK=$FILELIST_ENTRY_JSON_AWK" 1>&2
|
echo "$0: debug[3]: FILELIST_ENTRY_JSON_AWK=$FILELIST_ENTRY_JSON_AWK" 1>&2
|
||||||
echo "$0: debug[3]: IOCCC_CSS=$IOCCC_CSS" 1>&2
|
echo "$0: debug[3]: IOCCC_CSS=$IOCCC_CSS" 1>&2
|
||||||
@@ -386,7 +387,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary file manifest list
|
# create a temporary file manifest list
|
||||||
#
|
#
|
||||||
TMP_MANIFEST_LIST=".$NAME.$$.manifest.list"
|
export TMP_MANIFEST_LIST=".$NAME.$$.manifest.list"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary file manifest list: $TMP_MANIFEST_LIST" 1>&2
|
echo "$0: debug[3]: temporary file manifest list: $TMP_MANIFEST_LIST" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -408,7 +409,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary sort list of files to tar
|
# create a temporary sort list of files to tar
|
||||||
#
|
#
|
||||||
TMP_TAR_LIST=".$NAME.$$.tar.list"
|
export TMP_TAR_LIST=".$NAME.$$.tar.list"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary file tar list: $TMP_TAR_LIST" 1>&2
|
echo "$0: debug[3]: temporary file tar list: $TMP_TAR_LIST" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -433,7 +434,7 @@ fi
|
|||||||
# It is a pain to set the EXIT_CODE deep inside a loop, so we write the EXIT_CODE into a file
|
# It is a pain to set the EXIT_CODE deep inside a loop, so we write the EXIT_CODE into a file
|
||||||
# and read the file (setting EXIT_CODE again) after the loop. A hack, but good enough for our needs.
|
# and read the file (setting EXIT_CODE again) after the loop. A hack, but good enough for our needs.
|
||||||
#
|
#
|
||||||
TMP_EXIT_CODE=".$NAME.$$.exit.code"
|
export TMP_EXIT_CODE=".$NAME.$$.exit.code"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary exit code: $TMP_EXIT_CODE" 1>&2
|
echo "$0: debug[3]: temporary exit code: $TMP_EXIT_CODE" 1>&2
|
||||||
fi
|
fi
|
||||||
@@ -455,7 +456,7 @@ fi
|
|||||||
|
|
||||||
# create a temporary tarball
|
# create a temporary tarball
|
||||||
#
|
#
|
||||||
TMP_TARBALL=".$NAME.$$.tar.bz2"
|
export TMP_TARBALL=".$NAME.$$.tar.bz2"
|
||||||
if [[ $V_FLAG -ge 3 ]]; then
|
if [[ $V_FLAG -ge 3 ]]; then
|
||||||
echo "$0: debug[3]: temporary tarball: $TMP_TARBALL" 1>&2
|
echo "$0: debug[3]: temporary tarball: $TMP_TARBALL" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
+6
-3
@@ -83,7 +83,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="1.0 2024-03-25"
|
export VERSION="1.0.1 2024-03-26"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -338,17 +338,20 @@ if [[ $V_FLAG -ge 3 ]]; then
|
|||||||
echo "$0: debug[3]: NAME=$NAME" 1>&2
|
echo "$0: debug[3]: NAME=$NAME" 1>&2
|
||||||
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
echo "$0: debug[3]: V_FLAG=$V_FLAG" 1>&2
|
||||||
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2
|
|
||||||
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2
|
||||||
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2
|
||||||
|
echo "$0: debug[3]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
|
||||||
|
echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2
|
||||||
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
echo "$0: debug[3]: NOOP=$NOOP" 1>&2
|
||||||
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
|
||||||
echo "$0: debug[3]: CAP_W_FLAG_FOUND=$CAP_W_FLAG_FOUND" 1>&2
|
|
||||||
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
echo "$0: debug[3]: ENTRY_PATH=$ENTRY_PATH" 1>&2
|
||||||
echo "$0: debug[3]: REPO_NAME=$REPO_NAME" 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_DIR=$YEAR_DIR" 1>&2
|
echo "$0: debug[3]: YEAR_DIR=$YEAR_DIR" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_DIR=$ENTRY_DIR" 1>&2
|
echo "$0: debug[3]: ENTRY_DIR=$ENTRY_DIR" 1>&2
|
||||||
echo "$0: debug[3]: ENTRY_ID=$ENTRY_ID" 1>&2
|
echo "$0: debug[3]: ENTRY_ID=$ENTRY_ID" 1>&2
|
||||||
|
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
|
||||||
|
echo "$0: debug[3]: YYYY_DIR=$YYYY_DIR" 1>&2
|
||||||
echo "$0: debug[3]: TARBALL=$TARBALL" 1>&2
|
echo "$0: debug[3]: TARBALL=$TARBALL" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user