diff options
author | Volpeon <git@volpeon.ink> | 2020-12-26 09:52:34 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2020-12-26 09:52:34 +0100 |
commit | 15147ca676f7f77697889b65721540f8b8a813ab (patch) | |
tree | 563902c127d644f0f58fd26a901794c585d9c993 /scripts/build_content.sh | |
parent | Improved CSS definitions, more fine-grained content build script (diff) | |
download | volpeon.ink-15147ca676f7f77697889b65721540f8b8a813ab.tar.gz volpeon.ink-15147ca676f7f77697889b65721540f8b8a813ab.tar.bz2 volpeon.ink-15147ca676f7f77697889b65721540f8b8a813ab.zip |
Generate precompressed files, use variables for some nav-related values
Diffstat (limited to 'scripts/build_content.sh')
-rwxr-xr-x | scripts/build_content.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/build_content.sh b/scripts/build_content.sh index 6ce857f..9623427 100755 --- a/scripts/build_content.sh +++ b/scripts/build_content.sh | |||
@@ -13,7 +13,7 @@ handle () { | |||
13 | mkdir -p $(dirname "$TARGET") | 13 | mkdir -p $(dirname "$TARGET") |
14 | 14 | ||
15 | if [ "${1#*.}" = "md" ]; then | 15 | if [ "${1#*.}" = "md" ]; then |
16 | echo "[COMPILE] $1 -> $TARGET" | 16 | echo "[COMPILE ] $1 -> $TARGET" |
17 | 17 | ||
18 | pandoc "$1" \ | 18 | pandoc "$1" \ |
19 | -f markdown \ | 19 | -f markdown \ |
@@ -22,7 +22,7 @@ handle () { | |||
22 | -o "$TARGET" \ | 22 | -o "$TARGET" \ |
23 | --metadata-file metadata/metadata.json | 23 | --metadata-file metadata/metadata.json |
24 | else | 24 | else |
25 | echo "[COPY ] $1 -> $TARGET" | 25 | echo "[ COPY ] $1 -> $TARGET" |
26 | 26 | ||
27 | cp "$1" "$TARGET" | 27 | cp "$1" "$TARGET" |
28 | fi | 28 | fi |
@@ -45,18 +45,18 @@ elif [ "$1" = "md" ]; then | |||
45 | done | 45 | done |
46 | elif [ "$1" = "single" ]; then | 46 | elif [ "$1" = "single" ]; then |
47 | if [ -z "$2" ]; then | 47 | if [ -z "$2" ]; then |
48 | echo "[ERROR ] \"single\" operation requires file argument" | 48 | echo "[ ERROR ] \"single\" operation requires file argument" |
49 | else | 49 | else |
50 | handle "$2" | 50 | handle "$2" |
51 | fi | 51 | fi |
52 | elif [ "$1" = "delete" ]; then | 52 | elif [ "$1" = "delete" ]; then |
53 | if [ -z "$2" ]; then | 53 | if [ -z "$2" ]; then |
54 | echo "[ERROR ] \"delete\" operation requires file argument" | 54 | echo "[ ERROR ] \"delete\" operation requires file argument" |
55 | else | 55 | else |
56 | TARGET=$(target "$2") | 56 | TARGET=$(target "$2") |
57 | echo "[DELETE ] $2 -> $TARGET" | 57 | echo "[ DELETE ] $2 -> $TARGET" |
58 | rm -rf $TARGET | 58 | rm -rf $TARGET |
59 | fi | 59 | fi |
60 | else | 60 | else |
61 | echo "[ERROR ] Unknown operation: \"$1\"" | 61 | echo "[ ERROR ] Unknown operation: \"$1\"" |
62 | fi | 62 | fi |