sbs

A Simple Blogging System.
git clone https://git.sr.ht/~jbauer/sbs
Log | Files | Refs | README | LICENSE

commit 051191be2adde32280ac8bec53d640d74441bdef
parent 70a244abd79c946dbed1d3c2a4421dbdf99fcc98
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Wed, 17 Aug 2022 22:43:11 -0400

Improve comments in sbs code

Diffstat:
Msbs | 11++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sbs b/sbs @@ -5,14 +5,14 @@ # Copyright (C) 2022 Jake Bauer # Licensed under the terms of the ISC License, see LICENSE for details. -set -o errexit -set -o nounset +set -o errexit # Halt processing if an error is encountered +set -o nounset # Do not allow the use of variables that haven't been set if [ ! -x "$(command -v lowdown)" ]; then echo "The program 'lowdown' is needed but was not found."; exit 1 fi -# Create a new page or a new site +# Create a new page, post, or site with the following skeleton content new() { if [ "$2" = "page" ]; then @@ -87,7 +87,7 @@ parse_configuration() fi } -# Construct a complete atom feed +# Construct a complete atom feed from all blog posts genfeed() { { printf '<?xml version="1.0" encoding="utf-8"?>\n' printf '<feed xmlns="http://www.w3.org/2005/Atom">\n' @@ -142,7 +142,8 @@ build() build "$file"/* continue elif [ ! -f "$file" ]; then - printf "ERROR: %s does not exist.\n" "$file" + printf "ERROR: %s does not exist. " "$file" + printf "Are you sure you're in the right directory?\n" continue fi