aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild12
-rw-r--r--docs/news.xml2
-rw-r--r--docs/rss.xml2
3 files changed, 11 insertions, 5 deletions
diff --git a/build b/build
index e1332f4..382b549 100755
--- a/build
+++ b/build
@@ -1,5 +1,11 @@
#!/bin/sh -e
+sed_i() {
+ for file; do :; done
+ sed "$@" > _
+ cat _> "$file"; rm -f _
+}
+
header() {
cat <<EOF
<!DOCTYPE HTML>
@@ -49,7 +55,7 @@ genpages() {
for page in $(cd src || return 1 ; find . -name '*.md') ; do
tohtml "src/$page" > "docs/${page%.md}.html"
cp "src/$page" "docs/${page%.md}.txt"
- sed -i '/^Title:/d' "docs/${page%.md}.txt"
+ sed_i '/^Title:/d' "docs/${page%.md}.txt"
done
# Copy rest of the files
(cd src || return 1 ; find . -type f ! -name '*.md' -exec cp -u \{\} ../docs/\{\} \; )
@@ -59,12 +65,12 @@ genpages() {
tohtml() {
header "$(gettitle "$1")"
- sed '/Title:/d' "$1" | markdown
+ sed '/^[Tt]itle:/d' "$1" | markdown
footer "$(echo "$1" | sed 's/.md$/.txt/;s/src\/.//')"
}
wiki_index() {
- sed -i '/^Content/,$d' src/wiki/index.md
+ sed_i '/^Content/,$d' src/wiki/index.md
printf 'Content\n-------\n\n' >> src/wiki/index.md
for page in $(find src/wiki -type f | grep -v 'src/wiki/index.md' | sort) ; do
printf '* [%s](%s)\n' "$(gettitle "$page")" "$(printf "$page" | sed 's#src/wiki/##;s/.md/.html/')" >> src/wiki/index.md
diff --git a/docs/news.xml b/docs/news.xml
index 84a6ea3..386f44c 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -9,7 +9,7 @@
<description>a simple busybox linux distribution</description>
<link>https://carbslinux.org</link>
<atom:link href="https://carbslinux.org/news.xml" rel="self" type="application/rss+xml" />
-<lastBuildDate>May Tue 2020 10:00</lastBuildDate>
+<lastBuildDate>May Tue 2020 16:00</lastBuildDate>
<item>
<title>20200519.news</title>
<pubDate>Tue, 19 May 2020</pubDate>
diff --git a/docs/rss.xml b/docs/rss.xml
index 349fba6..abbcc79 100644
--- a/docs/rss.xml
+++ b/docs/rss.xml
@@ -9,7 +9,7 @@
<description>a simple busybox linux distribution</description>
<link>https://carbslinux.org</link>
<atom:link href="https://carbslinux.org/rss.xml" rel="self" type="application/rss+xml" />
-<lastBuildDate>May Tue 2020 10:00</lastBuildDate>
+<lastBuildDate>May Tue 2020 16:00</lastBuildDate>
<item>
<title>The Relation of Carbs and KISS</title>
<pubDate>Fri, 08 May 2020</pubDate>