From 11d8fc7ce1a2ff86ca5943889c22385b3c3bf970 Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Tue, 30 Jun 2020 02:41:39 -0400 Subject: [PATCH] made those eldritch monstrosities of sed incantations more readable --- build.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 841ba8f..0c54a4c 100755 --- a/build.sh +++ b/build.sh @@ -12,10 +12,18 @@ build() printf '\n%s %s\n' 'Building:' "$FILENAME" if [ "$FILENAME" != 'index.html' ]; then - sed '/{{HEADER}}/r inc/_header.html' "$FILE" | sed '/{{HEADER}}/D' | sed '/{{LOGONAV}}/r inc/_logonav.html' | sed '/{{LOGONAV}}/D' > "dist/$FILENAME" + sed '/{{HEADER}}/r inc/_header.html' "$FILE" |\ + sed '/{{HEADER}}/D' |\ + sed '/{{LOGONAV}}/r inc/_logonav.html' |\ + sed '/{{LOGONAV}}/D' > "dist/$FILENAME" else - sed '/{{HEADER}}/r inc/_header.html' "$FILE" | sed '/{{HEADER}}/D' | sed '/{{LOGONAV}}/r inc/_logonav.html' | sed '/{{LOGONAV}}/D' | sed '/{{NEWS}}/r inc/_news.html' | sed '/{{NEWS}}/D' > "dist/$FILENAME" - fi + sed '/{{HEADER}}/r inc/_header.html' "$FILE" |\ + sed '/{{HEADER}}/D' |\ + sed '/{{LOGONAV}}/r inc/_logonav.html' |\ + sed '/{{LOGONAV}}/D' |\ + sed '/{{NEWS}}/r inc/_news.html' |\ + sed '/{{NEWS}}/D' > "dist/$FILENAME" + fi done cp assets/* dist/