correctly process non-zero EXIT_CODE, fix 2020/endoh2/README.md
We found cases where pandoc reported a conversion from markdown to HTML problem that, while reported by the `bin/pandoc-wrapper.sh` to `bin/md2html.sh`, which in turn reported to error to the tool calling it, the tool calling `bin/md2html.sh` set `$EXIT_CODE` to a non-zero value in order to delay the abort but then failed to act on the non-zero `$EXIT_CODE` value at the end. In a number of cases when `$EXIT_CODE` was set to non-zero, the stderr message was labeled as a "Warning" instead of an "ERROR". Fixed a bug in `bin/gen-authors.sh` that resulted the generation of invalid markdown/HTML. An `<hr>` HTML tag inside a `<div>` span caused pandoc to issue "Div at .. closing implicitly" at the _hr_ HTML tag line. For some reason, one cannot place a `<hr>` (horizontal line) inside a `<div ... /div>` span. Fixed a broken markdown links in `2020/endoh2/README.md` whose error was hidden by one of the above mentioned problems. Changed `bin/gen-authors.sh` VERSION from "1.10.1 2024-05-07" to "1.10.2 2024-05-19" as a result of the above changes. Changed `bin/gen-location.sh` VERSION from "1.4.1 2024-04-28" to "1.4.2 2024-05-19" as a result of the above changes. Changed `bin/gen-top-html.sh` VERSION from "1.4.6 2024-05-05" to "1.4.5 2024-05-19" as a result of the above changes. Changed `bin/gen-years.sh` VERSION from "1.3.1 2024-04-28" to "1.3.2 2024-05-19" as a result of the above changes. Changed `bin/quick-readme2index.sh` VERSION from "1.1.4 2024-04-13" to "1.1.5 2024-05-19" as a result of the above changes. Changed `bin/readme2index.sh` VERSION from "1.2.4 2024-04-14" to "1.2.5 2024-05-19" as a result of the above changes. Performed `make www` to test the above under macOS.
This commit is contained in:
1 parent
f484d0a045
commit
69c38e0a48
10 files changed
+74
-55
No files matched your search
@@ -29,11 +29,11 @@ What happens if you do
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
Clever use of the C99 complex data type. The [spoiler](spoiler/spoiler.html) directory
|
||||
Clever use of the C99 complex data type. The [spoiler](spoiler/index.html) directory
|
||||
contains clues as to how some winning authors create / edit programs into ASCII
|
||||
shapes.
|
||||
|
||||
With the source from the [spoiler](spoiler/spoiler.html) directory could you make the code
|
||||
With the source from the [spoiler](spoiler/index.html) directory could you make the code
|
||||
render for a larger terminal window? How about adding more glyphs?
|
||||
|
||||
|
||||
|
||||
@@ -405,10 +405,10 @@ Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em></li>
|
||||
<pre><code> ./prog prog.c</code></pre>
|
||||
<p>?</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Clever use of the C99 complex data type. The <a href="spoiler/spoiler.html">spoiler</a> directory
|
||||
<p>Clever use of the C99 complex data type. The <a href="spoiler/index.html">spoiler</a> directory
|
||||
contains clues as to how some winning authors create / edit programs into ASCII
|
||||
shapes.</p>
|
||||
<p>With the source from the <a href="spoiler/spoiler.html">spoiler</a> directory could you make the code
|
||||
<p>With the source from the <a href="spoiler/index.html">spoiler</a> directory could you make the code
|
||||
render for a larger terminal window? How about adding more glyphs?</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
<p>No! Try not. Do, or do not. There is no try.</p>
|
||||
|
||||
+26
-26
@@ -409,9 +409,9 @@ Jump to authors starting with: [
|
||||
<!-- A A A A A A A A A A A A A A A A A A A A A A -->
|
||||
<div id="A">
|
||||
<h2 id="a-is-for-atoi">A is for atoi</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- A A A A A A A A A A A A A A A A A A A A A A -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Ondrej_Adamovsky">
|
||||
@@ -644,9 +644,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="B">
|
||||
<h2 id="b-is-for-break">B is for break</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- B B B B B B B B B B B B B B B B B B B B B B -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Bas_de_Bakker">
|
||||
@@ -1057,9 +1057,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="C">
|
||||
<h2 id="c-is-for-const">C is for const</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- C C C C C C C C C C C C C C C C C C C C C C -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Adrian_Cable">
|
||||
@@ -1182,9 +1182,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="D">
|
||||
<h2 id="d-is-for-do">D is for do</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- D D D D D D D D D D D D D D D D D D D D D D -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="John_Dalbec">
|
||||
@@ -1439,9 +1439,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="E">
|
||||
<h2 id="e-is-for-else">E is for else</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- E E E E E E E E E E E E E E E E E E E E E E -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Peter_Eastman">
|
||||
@@ -1529,9 +1529,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="F">
|
||||
<h2 id="f-is-for-float">F is for float</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- F F F F F F F F F F F F F F F F F F F F F F -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Cody_Boone_Ferguson">
|
||||
@@ -1663,9 +1663,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="G">
|
||||
<h2 id="g-is-for-getc">G is for getc</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- G G G G G G G G G G G G G G G G G G G G G G -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Anders_Gavare">
|
||||
@@ -1803,9 +1803,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="H">
|
||||
<h2 id="h-is-for-hypot">H is for hypot</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- H H H H H H H H H H H H H H H H H H H H H H -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Jim_Hague">
|
||||
@@ -2113,9 +2113,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="I">
|
||||
<h2 id="i-is-for-int">I is for int</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- I I I I I I I I I I I I I I I I I I I I I I -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Mark_Isaak">
|
||||
@@ -2135,9 +2135,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="J">
|
||||
<h2 id="j-is-for-jmp_buf">J is for jmp_buf</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- J J J J J J J J J J J J J J J J J J J J J J -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Thomas_P_John">
|
||||
@@ -2191,9 +2191,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="K">
|
||||
<h2 id="k-is-for-killchar">K is for killchar</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- K K K K K K K K K K K K K K K K K K K K K K -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Seonghoon_Kang">
|
||||
@@ -2351,9 +2351,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="L">
|
||||
<h2 id="l-is-for-long">L is for long</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- L L L L L L L L L L L L L L L L L L L L L L -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Mike_Laman">
|
||||
@@ -2534,9 +2534,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="M">
|
||||
<h2 id="m-is-for-malloc">M is for malloc</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- M M M M M M M M M M M M M M M M M M M M M M -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="David_Madore">
|
||||
@@ -2793,9 +2793,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="N">
|
||||
<h2 id="n-is-for-nullptr">N is for nullptr</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- N N N N N N N N N N N N N N N N N N N N N N -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Jeff_Newbern">
|
||||
@@ -2864,9 +2864,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="O">
|
||||
<h2 id="o-is-for-open">O is for open</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- O O O O O O O O O O O O O O O O O O O O O O -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Nicolas_Ollinger">
|
||||
@@ -2941,9 +2941,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="P">
|
||||
<h2 id="p-is-for-printf">P is for printf</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- P P P P P P P P P P P P P P P P P P P P P P -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Michael_H_Pawka">
|
||||
@@ -3083,15 +3083,15 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="Q">
|
||||
<h2 id="q-is-for-qsort">Q is for qsort</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- R R R R R R R R R R R R R R R R R R R R R R -->
|
||||
<div id="R">
|
||||
<h2 id="r-is-for-return">R is for return</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- R R R R R R R R R R R R R R R R R R R R R R -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Byron_Rakitzis">
|
||||
@@ -3250,9 +3250,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="S">
|
||||
<h2 id="s-is-for-switch">S is for switch</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- S S S S S S S S S S S S S S S S S S S S S S -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Michael_Savastio">
|
||||
@@ -3552,9 +3552,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="T">
|
||||
<h2 id="t-is-for-true">T is for true</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- T T T T T T T T T T T T T T T T T T T T T T -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Jon_Thingvold">
|
||||
@@ -3667,15 +3667,15 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="U">
|
||||
<h2 id="u-is-for-union">U is for union</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- U U U U U U U U U U U U U U U U U U U U U U -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- V V V V V V V V V V V V V V V V V V V V V V -->
|
||||
<div id="V">
|
||||
<h2 id="v-is-for-volatile">V is for volatile</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- V V V V V V V V V V V V V V V V V V V V V V -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Daniel_Vik">
|
||||
@@ -3732,9 +3732,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="W">
|
||||
<h2 id="w-is-for-while">W is for while</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- W W W W W W W W W W W W W W W W W W W W W W -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Larry_Wall">
|
||||
@@ -3861,15 +3861,15 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="X">
|
||||
<h2 id="x-is-for-xor">X is for xor</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- X X X X X X X X X X X X X X X X X X X X X X -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y -->
|
||||
<div id="Y">
|
||||
<h2 id="y-is-for-y0">Y is for y0</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Don_Yang">
|
||||
@@ -3900,9 +3900,9 @@ author_handle: <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<div id="Z">
|
||||
<h2 id="z-is-for-zlib">Z is for zlib</h2>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<!-- Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z -->
|
||||
</div>
|
||||
<hr style="width:10%;text-align:left;margin-left:0">
|
||||
<p>
|
||||
</p>
|
||||
<div id="Lord_Zarbon">
|
||||
|
||||
+7
-4
@@ -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
|
||||
#
|
||||
export VERSION="1.10.1 2024-05-07"
|
||||
export VERSION="1.10.2 2024-05-19"
|
||||
NAME=$(basename "$0")
|
||||
export NAME
|
||||
export V_FLAG=0
|
||||
@@ -1141,9 +1141,9 @@ EOF
|
||||
fi
|
||||
echo "<div id=\"$l\">"
|
||||
echo "## ${IS_FOR[$l]}"
|
||||
echo '<hr style="width:10%;text-align:left;margin-left:0">'
|
||||
echo "<!-- $l $l $l $l $l $l $l $l $l $l $l $l $l $l $l $l $l $l $l $l $l $l -->"
|
||||
echo "</div>"
|
||||
echo '<hr style="width:10%;text-align:left;margin-left:0">'
|
||||
echo
|
||||
|
||||
# case: we have a "sort_word file" line
|
||||
@@ -1358,7 +1358,7 @@ if [[ -z $NOOP ]]; then
|
||||
"$MD2HTML_SH" "${TOOL_OPTION[@]}" -- authors.md "$TMP_AUTHORS_MD" "$AUTHORS_HTML"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: Warning: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} -- authors.md $TMP_AUTHORS_MD $AUTHORS_HTML" \
|
||||
echo "$0: ERROR: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} -- authors.md $TMP_AUTHORS_MD $AUTHORS_HTML" \
|
||||
"failed, error: $status" 1>&2
|
||||
EXIT_CODE="1" # exit 1
|
||||
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
|
||||
@@ -1382,4 +1382,7 @@ fi
|
||||
|
||||
# All Done!!! -- Jessica Noll, Age 2
|
||||
#
|
||||
exit 0
|
||||
if [[ $EXIT_CODE -ne 0 ]]; then
|
||||
echo "$0: Warning: about to exit $EXIT_CODE" 1>&2
|
||||
fi
|
||||
exit "$EXIT_CODE"
|
||||
+5
-2
@@ -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
|
||||
#
|
||||
export VERSION="1.4.1 2024-04-28"
|
||||
export VERSION="1.4.2 2024-05-19"
|
||||
NAME=$(basename "$0")
|
||||
export NAME
|
||||
export V_FLAG=0
|
||||
@@ -602,4 +602,7 @@ fi
|
||||
|
||||
# All Done!!! -- Jessica Noll, Age 2
|
||||
#
|
||||
exit 0
|
||||
if [[ $EXIT_CODE -ne 0 ]]; then
|
||||
echo "$0: Warning: about to exit $EXIT_CODE" 1>&2
|
||||
fi
|
||||
exit "$EXIT_CODE"
|
||||
+14
-11
@@ -93,7 +93,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
||||
|
||||
# set variables referenced in the usage message
|
||||
#
|
||||
export VERSION="1.4.6 2024-05-05"
|
||||
export VERSION="1.4.5 2024-05-19"
|
||||
NAME=$(basename "$0")
|
||||
export NAME
|
||||
export V_FLAG=0
|
||||
@@ -476,25 +476,25 @@ if (( ${#TOP_MD_SELECT_SET[@]} )); then
|
||||
#
|
||||
export MD_FILE="$name.md"
|
||||
if [[ ! -e $MD_FILE ]]; then
|
||||
echo "$0: Warning: markdown file does not exist: $MD_FILE" 1>&2
|
||||
echo "$0: ERROR: markdown file does not exist: $MD_FILE" 1>&2
|
||||
EXIT_CODE=8 # exit 8
|
||||
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
|
||||
continue
|
||||
fi
|
||||
if [[ ! -f $MD_FILE ]]; then
|
||||
echo "$0: Warning: markdown file is not a regular file: $MD_FILE" 1>&2
|
||||
echo "$0: ERROR: markdown file is not a regular file: $MD_FILE" 1>&2
|
||||
EXIT_CODE=8 # exit 8
|
||||
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
|
||||
continue
|
||||
fi
|
||||
if [[ ! -r $MD_FILE ]]; then
|
||||
echo "$0: Warning: markdown file is not a readable file: $MD_FILE" 1>&2
|
||||
echo "$0: ERROR: markdown file is not a readable file: $MD_FILE" 1>&2
|
||||
EXIT_CODE=8 # exit 8
|
||||
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
|
||||
continue
|
||||
fi
|
||||
if [[ ! -s $MD_FILE ]]; then
|
||||
echo "$0: Warning: markdown file is not a non-empty readable file: $MD_FILE" 1>&2
|
||||
echo "$0: ERROR: markdown file is not a non-empty readable file: $MD_FILE" 1>&2
|
||||
EXIT_CODE=8 # exit 8
|
||||
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
|
||||
continue
|
||||
@@ -528,7 +528,7 @@ if (( ${#TOP_MD_SELECT_SET[@]} )); then
|
||||
-m "$MD_FILE" -- "$MD_FILE" "$HTML_FILE"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: Warning: md2html.sh: $MD2HTML_SH -U $SITE_URL/$HTML_FILE ${TOOL_OPTION[*]}" \
|
||||
echo "$0: ERROR: md2html.sh: $MD2HTML_SH -U $SITE_URL/$HTML_FILE ${TOOL_OPTION[*]}" \
|
||||
"-m $MD_FILE -- $MD_FILE $HTML_FILE" \
|
||||
"failed, error: $status" 1>&2
|
||||
EXIT_CODE="1" # exit 1
|
||||
@@ -551,25 +551,25 @@ else
|
||||
#
|
||||
export MD_FILE="$name.md"
|
||||
if [[ ! -e $MD_FILE ]]; then
|
||||
echo "$0: Warning: markdown file does not exist: $MD_FILE" 1>&2
|
||||
echo "$0: ERROR: markdown file does not exist: $MD_FILE" 1>&2
|
||||
EXIT_CODE=8 # exit 8
|
||||
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
|
||||
continue
|
||||
fi
|
||||
if [[ ! -f $MD_FILE ]]; then
|
||||
echo "$0: Warning: markdown file is not a regular file: $MD_FILE" 1>&2
|
||||
echo "$0: ERROR: markdown file is not a regular file: $MD_FILE" 1>&2
|
||||
EXIT_CODE=8 # exit 8
|
||||
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
|
||||
continue
|
||||
fi
|
||||
if [[ ! -r $MD_FILE ]]; then
|
||||
echo "$0: Warning: markdown file is not a readable file: $MD_FILE" 1>&2
|
||||
echo "$0: ERROR: markdown file is not a readable file: $MD_FILE" 1>&2
|
||||
EXIT_CODE=8 # exit 8
|
||||
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
|
||||
continue
|
||||
fi
|
||||
if [[ ! -s $MD_FILE ]]; then
|
||||
echo "$0: Warning: markdown file is not a non-empty readable file: $MD_FILE" 1>&2
|
||||
echo "$0: ERROR: markdown file is not a non-empty readable file: $MD_FILE" 1>&2
|
||||
EXIT_CODE=8 # exit 8
|
||||
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
|
||||
continue
|
||||
@@ -603,7 +603,7 @@ else
|
||||
-m "$MD_FILE" -- "$MD_FILE" "$HTML_FILE"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: Warning: md2html.sh: $MD2HTML_SH -U $SITE_URL/$HTML_FILE ${TOOL_OPTION[*]}" \
|
||||
echo "$0: ERROR: md2html.sh: $MD2HTML_SH -U $SITE_URL/$HTML_FILE ${TOOL_OPTION[*]}" \
|
||||
"-m $MD_FILE -- $MD_FILE $HTML_FILE" \
|
||||
"failed, error: $status" 1>&2
|
||||
EXIT_CODE="1" # exit 1
|
||||
@@ -623,4 +623,7 @@ fi
|
||||
|
||||
# All Done!!! -- Jessica Noll, Age 2
|
||||
#
|
||||
if [[ $EXIT_CODE -ne 0 ]]; then
|
||||
echo "$0: Warning: about to exit $EXIT_CODE" 1>&2
|
||||
fi
|
||||
exit "$EXIT_CODE"
|
||||
+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
|
||||
#
|
||||
export VERSION="1.3.1 2024-04-28"
|
||||
export VERSION="1.3.2 2024-05-19"
|
||||
NAME=$(basename "$0")
|
||||
export NAME
|
||||
export V_FLAG=0
|
||||
@@ -858,7 +858,7 @@ if [[ -z $NOOP ]]; then
|
||||
"$MD2HTML_SH" "${TOOL_OPTION[@]}" -- years.md "$TMP_YEARS_MD" "$YEARS_HTML"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: Warning: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} -- years.md $TMP_YEARS_MD $YEARS_HTML" \
|
||||
echo "$0: ERROR: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} -- years.md $TMP_YEARS_MD $YEARS_HTML" \
|
||||
"failed, error: $status" 1>&2
|
||||
EXIT_CODE="1" # exit 1
|
||||
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
|
||||
@@ -882,4 +882,7 @@ fi
|
||||
|
||||
# All Done!!! -- Jessica Noll, Age 2
|
||||
#
|
||||
exit 0
|
||||
if [[ $EXIT_CODE -ne 0 ]]; then
|
||||
echo "$0: Warning: about to exit $EXIT_CODE" 1>&2
|
||||
fi
|
||||
exit "$EXIT_CODE"
|
||||
@@ -413,6 +413,10 @@ else
|
||||
fi
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: pandoc: $PANDOC_TOOL exited non-zero: $status" 1>&2
|
||||
cp -f "$MARKDOWN_INPUT" XXX # XXX
|
||||
if [[ -n $NOOP ]]; then
|
||||
cp -f "$HTML_OUTPUT" YYY # XXX
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
|
||||
|
||||
# set variables referenced in the usage message
|
||||
#
|
||||
export VERSION="1.1.4 2024-04-13"
|
||||
export VERSION="1.1.5 2024-05-19"
|
||||
NAME=$(basename "$0")
|
||||
export NAME
|
||||
export V_FLAG=0
|
||||
@@ -549,7 +549,7 @@ if [[ -z $NOOP ]]; then
|
||||
"$README_PATH" "$INDEX_PATH"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: Warning: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} -m $README_PATH --" \
|
||||
echo "$0: ERROR: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} -m $README_PATH --" \
|
||||
"$README_PATH $INDEX_PATH failed, error: $status" 1>&2
|
||||
EXIT_CODE="1" # exit 1
|
||||
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
|
||||
@@ -580,4 +580,7 @@ fi
|
||||
|
||||
# All Done!!! -- Jessica Noll, Age 2
|
||||
#
|
||||
exit 0
|
||||
if [[ $EXIT_CODE -ne 0 ]]; then
|
||||
echo "$0: Warning: about to exit $EXIT_CODE" 1>&2
|
||||
fi
|
||||
exit "$EXIT_CODE"
|
||||
+2
-2
@@ -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
|
||||
#
|
||||
export VERSION="1.2.4 2024-04-14"
|
||||
export VERSION="1.2.5 2024-05-19"
|
||||
NAME=$(basename "$0")
|
||||
export NAME
|
||||
export V_FLAG=0
|
||||
@@ -512,7 +512,7 @@ if [[ -z $NOOP ]]; then
|
||||
"$README_PATH" "$INDEX_PATH"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: Warning: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} -m $README_PATH --" \
|
||||
echo "$0: ERROR: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} -m $README_PATH --" \
|
||||
"$README_PATH $INDEX_PATH failed, error: $status" 1>&2
|
||||
EXIT_CODE="1" # exit 1
|
||||
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
|
||||
|
||||
Reference in new issue
Block a user