>=
<>
Install [coolscripts](https://github.com/ctarbide/coolscripts), download files
below, make `build.sh` executable, run it and start playing around.
**************** Sources Listing
<>
Generated [output](wip.c) from files above.
More details in the link below.
@
<>=
2024
@
<>=
2024-03-27_00h04m58
@
<>=
scaffolding_for_c
@
<>=
scaffolding_for_c
@
<>=
pages/<>/<>_<>
@
<>=
pages/<>/<>_<>
@
<>=
<><>
@
<>=
<>/index.html
@
<<*>>=
<>
if git-file-is-pristine.sh <>; then
rm -f .draft
else
date '+%Y-%m-%d_%Hh%Mm%S' > .draft
git reset --quiet -- index.html
fi
nofake --error -Rrender <> | sh
@
<>=
<>/assets.nw README.txt wip.nw Makefile-wip.nw
@
<>=
../../..
@
<>=
../..
@
<>=
ctarbi.de - scaffolding for c
@
<>=
#!/bin/sh
set -eu
@
<>=
if [ -f .draft ]; then
last-modified.sh <> | perl -MPOSIX=strftime \
-lne'print(strftime(qq{@<>=\n%B %e, %Y (DRAFT)\n@\n}, gmtime($_)))'
else
FORMAT='format:%s %B %e, %Y at %T UTC' git-last-modified.sh <> |
LC_ALL=C sort -nr | head -n1 | perl \
-lne's,^\d+ ,,; print(qq{@<>=\n${_}\n@\n})'
fi
@
<>=
t0=`perl -MTime::HiRes=time -le'print(time)'`
@
<>=
perl -MTime::HiRes=time -MPOSIX=strftime -le'
$t1 = time;
$t0 = $ARGV[0];
printf(qq{\n\n},
$t1 - $t0, strftime(q{%B %e, %Y at %T UTC}, gmtime))
' -- "${t0}"
@
<>=
cat .index.html > index.html
<> @>> index.html
chmod 0444 index.html
@
<>=
if [ -f index.html ]; then
if [ .index.html -nt index.html ]; then
rm -f index.html
<>
else
echo "index.html is up to date."
fi
else
<>
fi
@
<>=
printf '@<>=\n'
<>/bin/show-config.sh website.base-url
printf '@\n'
@
<>=
list_set_downloadable_sources(){
cat<<'EOF' | cmd_push_to_argv
build.sh
Makefile-wip.nw
<>
EOF
}
@
<>=
<>
<>
printf '@<>=\n'
eval "set --; `list_set_downloadable_sources`"
for dep; do
printf -- '- [%s](%s)\n\n' "${dep}" "${dep}"
done
printf '@\n'
@
<>=
<>
<>
cat <>
<>
<>
@
<>=
nofake --error -Rgenerate <> | sh | gzip > .cache
(
gzip -dc .cache
printf '@<>=\n'
gzip -dc .cache | nofake --error -R'body in markdown' |
"<>/bin/md-autoheader-autolink.pl" |
<>
printf '@\n'
) | CHMOD='chmod 0444' nofake.sh --error -Rindex.html -o.index.html
@
<>=
<>
<>
<>
<>
@
<>=
<>
<>
<