From 630f3954da722568e41a2aab14c508d95fd0fb99 Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Sat, 25 May 2024 17:02:06 +0100 Subject: Resolved issues after moving from gnu/linux to a bsd/linux hybrid - Chimera Linux --- blarg | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/blarg b/blarg index 1c7272e..0f212a1 100755 --- a/blarg +++ b/blarg @@ -9,14 +9,14 @@ index_tsv() { do created=$(git log --pretty='format:%aI' "$f" 2> /dev/null | tail -1) updated=$(git log --pretty='format:%aI' "$f" 2> /dev/null | head -1) - title=$(sed -n '/^# /{s/# //p; q}' "$f") + title=$(sed -n '/^# /{s/# //p; q;}' "$f") printf '%s\t%s\t%s\t%s\n' "$f" "${title:="No Title"}" "${created}" "${updated}" done } index_html() { # Print header - title=$(sed -n '/^# /{s/# //p; q}' index.md) + title=$(sed -n '/^# /{s/# //p; q;}' index.md) sed -e 's/{{TITLE}}//g' header.html # Intro text @@ -47,7 +47,7 @@ atom_xml() { https://justine.smithies.me.uk/public/favicon-32x32.png $(grep -o '<title>.*' header.html | sed 's/\(\|{{TITLE}}<\/title>\)//g') - $(date --iso=seconds) + $(date -Iseconds) $(git config user.name) @@ -92,7 +92,8 @@ write_page() { title=$2 $MARKDOWN "$filename" | \ - sed -e '1,/h1>/{/h1>/a '$dates_text'' -e '}' | \ + sed -e '1,/h1>/{/h1>/a\ + '$dates_text'' -e '}' | \ cat header.html - | \ sed "s/{{TITLE}}/ - $title/" \ > "$target" && sed "s/{{YEAR}}/$year/" footer.html >> "$target" -- cgit v1.2.3