From 8f795b1d445441daab5ffb75060a6dbf8ed0934a Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 8 Sep 2017 01:28:21 +0200 Subject: Renaming scripts so that their names make sense --- bin/statics-generate.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 bin/statics-generate.sh (limited to 'bin/statics-generate.sh') diff --git a/bin/statics-generate.sh b/bin/statics-generate.sh new file mode 100755 index 0000000..9c2fa92 --- /dev/null +++ b/bin/statics-generate.sh @@ -0,0 +1,16 @@ +#!/bin/bash +CONFIG=$1 +CONTENT_DIR=$2 +OUTPUT_DIR=$3 +cat $1 | + jq -r '.[] | .content, .header, .url' | + while read CONTENT_FILE + do + read HEADER + read OUTPUT_FILE + if [ -n "$CONTENT_FILE" ] + then + python scripts/statics-compile.py $CONTENT_DIR/$CONTENT_FILE "$HEADER" > $OUTPUT_DIR/$OUTPUT_FILE + python scripts/menus-write.py $OUTPUT_DIR/$OUTPUT_FILE $OUTPUT_DIR/.menu.html + fi + done -- cgit v1.2.3