diff options
author | Volpeon <git@volpeon.ink> | 2020-12-25 13:22:37 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2020-12-25 13:22:37 +0100 |
commit | e7d6404ab184a5f6a8645bd0ac90b3676b8c5efc (patch) | |
tree | 3d09f5793e666f27c888f536bbe54839974c4fbc /scripts | |
parent | Various improvements: CSS classes, favicon, design (diff) | |
download | volpeon.ink-e7d6404ab184a5f6a8645bd0ac90b3676b8c5efc.tar.gz volpeon.ink-e7d6404ab184a5f6a8645bd0ac90b3676b8c5efc.tar.bz2 volpeon.ink-e7d6404ab184a5f6a8645bd0ac90b3676b8c5efc.zip |
Improved CSS definitions, more fine-grained content build script
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_content.sh | 28 | ||||
-rwxr-xr-x | scripts/watch_content.sh | 4 | ||||
-rwxr-xr-x | scripts/watch_metadata.sh | 2 | ||||
-rwxr-xr-x | scripts/watch_templates.sh | 2 |
4 files changed, 27 insertions, 9 deletions
diff --git a/scripts/build_content.sh b/scripts/build_content.sh index ca75120..6ce857f 100755 --- a/scripts/build_content.sh +++ b/scripts/build_content.sh | |||
@@ -35,10 +35,28 @@ if [ -z "$1" ]; then | |||
35 | do | 35 | do |
36 | handle "$FILE" | 36 | handle "$FILE" |
37 | done | 37 | done |
38 | elif [ "$2" = "delete" ]; then | 38 | elif [ "$1" = "md" ]; then |
39 | TARGET=$(target "$1") | 39 | find content/ \ |
40 | echo "[DELETE ] $1 -> $TARGET" | 40 | -type f \ |
41 | rm -rf $TARGET | 41 | -name "*.md" \ |
42 | | while read FILE | ||
43 | do | ||
44 | handle "$FILE" | ||
45 | done | ||
46 | elif [ "$1" = "single" ]; then | ||
47 | if [ -z "$2" ]; then | ||
48 | echo "[ERROR ] \"single\" operation requires file argument" | ||
49 | else | ||
50 | handle "$2" | ||
51 | fi | ||
52 | elif [ "$1" = "delete" ]; then | ||
53 | if [ -z "$2" ]; then | ||
54 | echo "[ERROR ] \"delete\" operation requires file argument" | ||
55 | else | ||
56 | TARGET=$(target "$2") | ||
57 | echo "[DELETE ] $2 -> $TARGET" | ||
58 | rm -rf $TARGET | ||
59 | fi | ||
42 | else | 60 | else |
43 | handle "$1" | 61 | echo "[ERROR ] Unknown operation: \"$1\"" |
44 | fi | 62 | fi |
diff --git a/scripts/watch_content.sh b/scripts/watch_content.sh index c4f55fb..769f2c5 100755 --- a/scripts/watch_content.sh +++ b/scripts/watch_content.sh | |||
@@ -4,8 +4,8 @@ inotifywait -qrme close_write,delete,move --format "%w%f" content \ | |||
4 | | while read FILENAME | 4 | | while read FILENAME |
5 | do | 5 | do |
6 | if [ -f "$FILENAME" ]; then | 6 | if [ -f "$FILENAME" ]; then |
7 | scripts/build_content.sh "$FILENAME" | 7 | scripts/build_content.sh "single" "$FILENAME" |
8 | elif [ ! -d "$FILENAME" ]; then | 8 | elif [ ! -d "$FILENAME" ]; then |
9 | scripts/build_content.sh "$FILENAME" "delete" | 9 | scripts/build_content.sh "delete" "$FILENAME" |
10 | fi | 10 | fi |
11 | done | 11 | done |
diff --git a/scripts/watch_metadata.sh b/scripts/watch_metadata.sh index af2e6a7..4323c90 100755 --- a/scripts/watch_metadata.sh +++ b/scripts/watch_metadata.sh | |||
@@ -3,5 +3,5 @@ | |||
3 | inotifywait -qrme close_write,delete,move --format "%w%f" metadata \ | 3 | inotifywait -qrme close_write,delete,move --format "%w%f" metadata \ |
4 | | while read FILENAME | 4 | | while read FILENAME |
5 | do | 5 | do |
6 | scripts/build_content.sh | 6 | scripts/build_content.sh "md" |
7 | done | 7 | done |
diff --git a/scripts/watch_templates.sh b/scripts/watch_templates.sh index 160a46c..9c7e787 100755 --- a/scripts/watch_templates.sh +++ b/scripts/watch_templates.sh | |||
@@ -3,5 +3,5 @@ | |||
3 | inotifywait -qrme close_write,delete,move --format "%w%f" templates \ | 3 | inotifywait -qrme close_write,delete,move --format "%w%f" templates \ |
4 | | while read FILENAME | 4 | | while read FILENAME |
5 | do | 5 | do |
6 | scripts/build_content.sh | 6 | scripts/build_content.sh "md" |
7 | done | 7 | done |