summaryrefslogtreecommitdiff
path: root/bin/generate-statics.sh
blob: f632d695c40f3c47ea05d62ccd5d9bec3034fdad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/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 static.py $CONTENT_DIR/$CONTENT_FILE "$HEADER" > $OUTPUT_DIR/$OUTPUT_FILE
        fi
    done