wowana.me
website source
commit 40c19c3907d1a304ff2fa81fbb52d09de2e2d4a1 parent 9467ae4693f88a677d81ebab93ad6e8c46fadfe2 Author: opal hart <opal@wowana.me> Date: Sun, 8 Dec 2019 01:27:24 +0000 force scripts to use busybox `date` coreutils date (and potentially other implementations) does not accept date format we use Diffstat:
M | .gitignore | | | 4 | ++++ |
M | scripts/feed.sh | | | 6 | +++--- |
M | scripts/postproc.sh | | | 6 | +++--- |
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/.gitignore b/.gitignore @@ -1,5 +1,9 @@ /out/** !/out/.well-known/ !/out/cloudflare-warning.svg +!/out/files +!/out/files/** !/out/opal.css +!/out/pgp +!/out/pgp/** !/out/robots.txt diff --git a/scripts/feed.sh b/scripts/feed.sh @@ -7,7 +7,7 @@ cat <<HEADER <link href="/blog/" rel="alternate"/> <link href="/blog/feed.atom" rel="self"/> <id>/blog/</id> - <updated>$(date -Iseconds)</updated> + <updated>$(busybox date -Iseconds)</updated> HEADER for filename in "$@"; do @@ -15,7 +15,7 @@ for filename in "$@"; do unset iso human datepat date="$(<"$filename" sed -n '/<!--\[time / {s/.* \(.*\)]-->/\1/; p; q}')" - iso="$(date -Iseconds -d$date)" + iso="$(busybox date -Iseconds -d$date)" datepat="s@<!--\[time.*]-->@<time datetime='$iso' title='$iso'>$human</time>@;" #<"$filename" sed -e"$datepat" @@ -25,7 +25,7 @@ for filename in "$@"; do <link href="/blog/$slug.xht" rel="alternate" type="application/xhtml+xml" /> <id>/blog/$slug.xht</id> <published>$iso</published> - <updated>$(date -r${filename/.part.xht/.md} -Iseconds)</updated> + <updated>$(busybox date -r${filename/.part.xht/.md} -Iseconds)</updated> <author><name>opal hart</name></author> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> diff --git a/scripts/postproc.sh b/scripts/postproc.sh @@ -6,8 +6,8 @@ slug="$(basename "$filename" .part.xht)" unset iso human datepat date="$(sed <"$filename" -n '/<!--\[time / {s/.* \(.*\)]-->/\1/; p; q}')" if test -n "$date"; then - iso="$(date -Iseconds -d$date)" - human="$(date +'%Y %b %d' -d$date)" + iso="$(busybox date -Iseconds -d$date)" + human="$(busybox date +'%Y %b %d' -d$date)" datepat="s@<!--\[time.*]-->@<time datetime='$iso' title='$iso'>$human</time>@;" fi @@ -19,7 +19,7 @@ else fi <"$filename" sed \ - -e"1i <main id='$slug'>" \ + -e"1i <main>" \ -e"$datepat"'$a </main>' cat <src/footer.inc