From 6e67a846f060ff6bb436cd2ff269b181ac52980c Mon Sep 17 00:00:00 2001 From: Bradley Taunt Date: Sun, 14 Jul 2024 11:57:49 -0400 Subject: Update barf script and include sourcehut build file --- barf | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 69 insertions(+), 12 deletions(-) (limited to 'barf') diff --git a/barf b/barf index 81bbcd2..5c0db4d 100755 --- a/barf +++ b/barf @@ -1,9 +1,24 @@ #!/bin/sh + +domain="https://jsfree.org" + +# Check the operating system +os_name=$(uname -s) + +if [ "$os_name" = "OpenBSD" ]; then + alias sed=gsed + alias date=gdate + alias rsync=openrsync +elif [ "$os_name" = "Darwin" ]; then + alias sed=gsed + alias date=gdate +fi + set -eu -MARKDOWN=smu +MARKDOWN=lowdown IFS=' ' -# Create tab separated file with filename, title, creation date, last update +# Create tab-separated file with filename, title, creation date, last update index_tsv() { for f in "$1"/*.md do @@ -20,13 +35,13 @@ index_html() { # Intro text $MARKDOWN index.md - echo "