summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2020-12-25 13:22:37 +0100
committerVolpeon <git@volpeon.ink>2020-12-25 13:22:37 +0100
commite7d6404ab184a5f6a8645bd0ac90b3676b8c5efc (patch)
tree3d09f5793e666f27c888f536bbe54839974c4fbc /scripts
parentVarious improvements: CSS classes, favicon, design (diff)
downloadvolpeon.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-xscripts/build_content.sh28
-rwxr-xr-xscripts/watch_content.sh4
-rwxr-xr-xscripts/watch_metadata.sh2
-rwxr-xr-xscripts/watch_templates.sh2
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
38elif [ "$2" = "delete" ]; then 38elif [ "$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
46elif [ "$1" = "single" ]; then
47 if [ -z "$2" ]; then
48 echo "[ERROR ] \"single\" operation requires file argument"
49 else
50 handle "$2"
51 fi
52elif [ "$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
42else 60else
43 handle "$1" 61 echo "[ERROR ] Unknown operation: \"$1\""
44fi 62fi
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 @@
3inotifywait -qrme close_write,delete,move --format "%w%f" metadata \ 3inotifywait -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 @@
3inotifywait -qrme close_write,delete,move --format "%w%f" templates \ 3inotifywait -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