From e7d6404ab184a5f6a8645bd0ac90b3676b8c5efc Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 25 Dec 2020 13:22:37 +0100 Subject: Improved CSS definitions, more fine-grained content build script --- scripts/build_content.sh | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'scripts/build_content.sh') diff --git a/scripts/build_content.sh b/scripts/build_content.sh index ca75120..6ce857f 100755 --- a/scripts/build_content.sh +++ b/scripts/build_content.sh @@ -35,10 +35,28 @@ if [ -z "$1" ]; then do handle "$FILE" done -elif [ "$2" = "delete" ]; then - TARGET=$(target "$1") - echo "[DELETE ] $1 -> $TARGET" - rm -rf $TARGET +elif [ "$1" = "md" ]; then + find content/ \ + -type f \ + -name "*.md" \ + | while read FILE + do + handle "$FILE" + done +elif [ "$1" = "single" ]; then + if [ -z "$2" ]; then + echo "[ERROR ] \"single\" operation requires file argument" + else + handle "$2" + fi +elif [ "$1" = "delete" ]; then + if [ -z "$2" ]; then + echo "[ERROR ] \"delete\" operation requires file argument" + else + TARGET=$(target "$2") + echo "[DELETE ] $2 -> $TARGET" + rm -rf $TARGET + fi else - handle "$1" + echo "[ERROR ] Unknown operation: \"$1\"" fi -- cgit v1.2.3-54-g00ecf