tFix various GNUisms to comply with OpenBSD userland - monochromatic - monochromatic blog: http://blog.z3bra.org
(HTM) git clone git://z3bra.org/monochromatic
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit e04e47b0028d0ee67da301cfbed951c2e862f37f
(DIR) parent f5de4fbecb28836e6c06961b187be44520801b40
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Mon, 23 Dec 2019 15:34:44 +0100
Fix various GNUisms to comply with OpenBSD userland
Diffstat:
M Makefile | 4 ++--
M feed.sed | 20 +++++++++++---------
M genindex.sh | 2 +-
3 files changed, 14 insertions(+), 12 deletions(-)
---
(DIR) diff --git a/Makefile b/Makefile
t@@ -5,7 +5,7 @@ include config.mk
all: $(FEEDS) $(EXTRA) $(PAGES)
-$(NAME).tbz: $(PAGES) $(EXTRA) $(FEEDS)
+$(NAME).tbz: $(FEEDS) $(PAGES) $(EXTRA)
tar -cvjf $@ $(PAGES) $(EXTRA) $(FEEDS)
index.txt:
t@@ -13,7 +13,7 @@ index.txt:
$(FEEDS): index.txt
mkdir -p `dirname $@`
- sed -f ./feed.sed < $< > $@
+ sed -f ./feed.sed < index.txt > $@
.txt.html:
$(MD) $< | cat $(HEADER) - $(FOOTER) > $@
(DIR) diff --git a/feed.sed b/feed.sed
t@@ -1,17 +1,19 @@
#!/bin/sed -f
# RSS feed header
-1i<?xml version='1.0'?>
-1i<rss version='2.0' xmlns:atom="http://www.w3.org/2005/Atom">
-1i\ <channel>
-1i\ <title>Monochromatic</title>
-1i\ <description>z3bra, the stripes appart</description>
-1i\ <link>https://blog.z3bra.org</link>
-1i\ <atom:link href="https://blog.z3bra.org/rss/feed.xml" rel="self" type="application/rss+xml" />
+1i\
+<?xml version='1.0'?>\
+<rss version='2.0' xmlns:atom="http://www.w3.org/2005/Atom">\
+ <channel>\
+ <title>Monochromatic</title>\
+ <description>z3bra, the stripes appart</description>\
+ <link>https://blog.z3bra.org</link>\
+ <atom:link href="https://blog.z3bra.org/rss/feed.xml" rel="self" type="application/rss+xml" />
# Append all entries to the feed, one item per post
s^\* \([x0-9a-f]*\) - \[\(.*\)\](\(.*\)) <item><title>\2</title><guid isPermaLink=\"false\">\1</guid><link>https://blog.z3bra.org\3</link></item>
# close tags
-$a\ </channel>
-$a</rss>
+$a\
+ </channel>\
+</rss>
(DIR) diff --git a/genindex.sh b/genindex.sh
t@@ -6,4 +6,4 @@ for post in $(find 20* -type f -name '*.txt' ! -name 'index.txt'|sort); do
href="/${post%.txt}.html"
printf '* 0x%04x - [%s](%s)\n' "$i" "$title" "$href"
i=$((i+1))
-done | tac
+done | sort -r