__NL -> _NL, export

This commit is contained in:
yosh 2024-04-02 16:48:49 -04:00
parent ec827dafce
commit 4e5d2cde31
4 changed files with 8 additions and 8 deletions

View File

@ -4,7 +4,7 @@ __BASE="${SHP_BASE:-"$PWD"}"
export _INCDIR="${SHP_INCDIR:-"${__BASE}/include"}"
export _BUILDDIR="${SHP_BUILDDIR:-"${__BASE}/build"}"
export _SRCDIR="${SHP_SRCDIR:-"${__BASE}/src"}"
__NL="
export _NL="
"
# process an html formatted file either given or from stdin and output to stdout
@ -25,7 +25,7 @@ __process_shp() {
esac
fi
if [ -n "$__SH_FLAG'$__SHLVL'" ]; then
__LINE_EXEC_'$__SHLVL'="$__LINE_EXEC_'$__SHLVL'$__NL$__LINE'$__SHLVL'"
__LINE_EXEC_'$__SHLVL'="$__LINE_EXEC_'$__SHLVL'$_NL$__LINE'$__SHLVL'"
case "$__LINE'$__SHLVL'" in
*"?>"*)
eval "${__LINE_EXEC_'$__SHLVL'%%\?>*}"

View File

@ -19,8 +19,8 @@ for type in blog articles; do
for f in *.md; do
mtime="" ctime=""
set_md_metadata "$f"
all_ctimes="$ctime $f$__NL$all_ctimes"
all_mtimes="${mtime:-"$ctime"}$__NL$all_mtimes"
all_ctimes="$ctime $f$_NL$all_ctimes"
all_mtimes="${mtime:-"$ctime"}$_NL$all_mtimes"
done
while IFS= read -r _entry; do

View File

@ -49,9 +49,9 @@ while read -r time hash subject; do
<id>%s</id>
<updated>%s</updated>
<content type="html">%s</content>
</entry>' "$(escape "$subject")" "$hash" "$date" "$(escapepipe <<-EOF
</entry>\n' "$(escape "$subject")" "$hash" "$date" "$(escapepipe <<-EOF
<ul>
${desc:+"<p>$desc</p>$__NL"}$files
${desc:+"<p>$desc</p>$_NL"}$files
</ul>
EOF
)"

View File

@ -12,8 +12,8 @@ feed="$_BUILDDIR/blog/feed.atom"
for f in *.md; do
mtime="" ctime=""
set_md_metadata "$f"
all_ctimes="$ctime $f$__NL$all_ctimes"
all_mtimes="${mtime:-"$ctime"}$__NL$all_mtimes"
all_ctimes="$ctime $f$_NL$all_ctimes"
all_mtimes="${mtime:-"$ctime"}$_NL$all_mtimes"
done
while IFS= read -r _entry; do