🛠️ exec

acdw tipped me off to `exec > FILE`
which redirects all output to that file
so you don't have to pipe and append
so carefully all the time.
thanks acdw!!
main
Dozens B. McCuzzins 2023-11-16 15:07:34 -07:00
parent 5f4931c672
commit 39ec8c39c4
1 changed files with 5 additions and 4 deletions

View File

@ -26,12 +26,13 @@ html:
# build rss
rss:
#!/usr/bin/env sh
echo "<rss version=\"2.0\"><channel><title>list blog</title>" > www/feed.xml
echo "<link>http://tilde.town/~dozens/listblog/index.html</link><description>a blog that is just a bunch of lists</description><atom:link rel=\"self\" type=\"application/rss+xml\" href=\"http://tilde.town/~dozens/listblog/episodes.xml\"/>" >> www/feed.xml
exec > www/feed.xml
echo "<rss version=\"2.0\"><channel><title>list blog</title>"
echo "<link>http://tilde.town/~dozens/listblog/index.html</link><description>a blog that is just a bunch of lists</description><atom:link rel=\"self\" type=\"application/rss+xml\" href=\"http://tilde.town/~dozens/listblog/episodes.xml\"/>"
for f in `ls src/*.md`; do
ed -s $f < commands.ed | recfmt -f templates/template.recfmt | m4 >> www/feed.xml
ed -s $f < commands.ed | recfmt -f templates/template.recfmt | m4
done
echo '</channel></rss>' >> www/feed.xml
echo '</channel></rss>'
# make html and rss
build: index html rss