diff options
author | Ben Morrison <ben@gbmor.dev> | 2020-06-30 02:41:39 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2020-06-30 02:41:39 -0400 |
commit | 11d8fc7ce1a2ff86ca5943889c22385b3c3bf970 (patch) | |
tree | 1a2583be0b7c3ce081d2778fc007a94fa8601209 | |
parent | 5db8118b173d9ff0c4bc2d2c55e72967090ad991 (diff) | |
download | site-11d8fc7ce1a2ff86ca5943889c22385b3c3bf970.tar.gz |
made those eldritch monstrosities of sed incantations more readable
-rwxr-xr-x | build.sh | 14 |
1 files 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/ |