summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rwxr-xr-xscripts/build_content.sh12
-rwxr-xr-xscripts/build_fonts.sh4
-rwxr-xr-xscripts/build_sass.sh2
4 files changed, 12 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index caf9939..b8ebbbe 100644
--- a/Makefile
+++ b/Makefile
@@ -16,11 +16,11 @@ build_content: clean
16build_only: build_fonts build_sass build_content 16build_only: build_fonts build_sass build_content
17 17
18compress_gz: build_only 18compress_gz: build_only
19 @echo "[COMPRESS] Gzip" 19 @echo -e "\033[0;32m[COMPRESS]\033[0m Gzip"
20 @pigz -R -k -9 -- `find output -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\)'` 20 @pigz -R -k -9 -- `find output -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\)'`
21 21
22compress_br: build_only 22compress_br: build_only
23 @echo "[COMPRESS] Brotli" 23 @echo -e "\033[0;32m[COMPRESS]\033[0m Brotli"
24 @brotli -k -- `find output -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\|woff\\)'` 24 @brotli -k -- `find output -type f -iregex '.*\\.\\(css\\|js\\|json\\|html\\|xml\\|txt\\|svg\\|ico\\|woff\\)'`
25 25
26build: compress_gz compress_br 26build: compress_gz compress_br
@@ -45,6 +45,7 @@ serve_only: build_only
45serve: watch serve_only 45serve: watch serve_only
46 46
47deploy: build 47deploy: build
48 @echo -e "\033[0;32m[DEPLOY ]\033[0m volpeon.ink"
48 @rsync --progress --stats -avz --delete output/ vulpes@94.130.78.123:/srv/http/volpeon.ink/ 49 @rsync --progress --stats -avz --delete output/ vulpes@94.130.78.123:/srv/http/volpeon.ink/
49 50
50.PHONY: all clean build watch serve deploy 51.PHONY: all clean build watch serve deploy
diff --git a/scripts/build_content.sh b/scripts/build_content.sh
index 9623427..8acdcdf 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 -e "\033[0;32m[COMPILE ]\033[0m $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 -e "\033[0;32m[COPY ]\033[0m $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
46elif [ "$1" = "single" ]; then 46elif [ "$1" = "single" ]; then
47 if [ -z "$2" ]; then 47 if [ -z "$2" ]; then
48 echo "[ ERROR ] \"single\" operation requires file argument" 48 echo -e "\033[0;31m[ERROR ]\033[0m \"single\" operation requires file argument"
49 else 49 else
50 handle "$2" 50 handle "$2"
51 fi 51 fi
52elif [ "$1" = "delete" ]; then 52elif [ "$1" = "delete" ]; then
53 if [ -z "$2" ]; then 53 if [ -z "$2" ]; then
54 echo "[ ERROR ] \"delete\" operation requires file argument" 54 echo -e "\033[0;31m[ERROR ]\033[0m \"delete\" operation requires file argument"
55 else 55 else
56 TARGET=$(target "$2") 56 TARGET=$(target "$2")
57 echo "[ DELETE ] $2 -> $TARGET" 57 echo -e "\033[0;32m[DELETE ]\033[0m $2 -> $TARGET"
58 rm -rf $TARGET 58 rm -rf $TARGET
59 fi 59 fi
60else 60else
61 echo "[ ERROR ] Unknown operation: \"$1\"" 61 echo -e "\033[0;31m[ERROR ]\033[0m Unknown operation: \"$1\""
62fi 62fi
diff --git a/scripts/build_fonts.sh b/scripts/build_fonts.sh
index d8ed9ea..bd168df 100755
--- a/scripts/build_fonts.sh
+++ b/scripts/build_fonts.sh
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2 2
3echo "[ MINIFY ] assets/fonts/iosevka-term-ss09-regular.ttf -> output/iosevka-term-ss09-regular.woff2" 3echo -e "\033[0;32m[MINIFY ]\033[0m assets/fonts/iosevka-term-ss09-regular.ttf -> output/iosevka-term-ss09-regular.woff2"
4 4
5pyftsubset assets/fonts/iosevka-term-ss09-regular.ttf \ 5pyftsubset assets/fonts/iosevka-term-ss09-regular.ttf \
6 --text-file='assets/fonts/glyphs.txt' \ 6 --text-file='assets/fonts/glyphs.txt' \
@@ -8,7 +8,7 @@ pyftsubset assets/fonts/iosevka-term-ss09-regular.ttf \
8 --flavor='woff2' \ 8 --flavor='woff2' \
9 --output-file='output/iosevka-term-ss09-regular.woff2' 9 --output-file='output/iosevka-term-ss09-regular.woff2'
10 10
11echo "[ MINIFY ] assets/fonts/iosevka-term-ss09-bold.ttf -> output/iosevka-term-ss09-bold.woff2" 11echo -e "\033[0;32m[MINIFY ]\033[0m assets/fonts/iosevka-term-ss09-bold.ttf -> output/iosevka-term-ss09-bold.woff2"
12 12
13pyftsubset assets/fonts/iosevka-term-ss09-bold.ttf \ 13pyftsubset assets/fonts/iosevka-term-ss09-bold.ttf \
14 --text-file='assets/fonts/glyphs.txt' \ 14 --text-file='assets/fonts/glyphs.txt' \
diff --git a/scripts/build_sass.sh b/scripts/build_sass.sh
index 2711a89..df1c0a9 100755
--- a/scripts/build_sass.sh
+++ b/scripts/build_sass.sh
@@ -1,4 +1,4 @@
1#!/bin/bash 1#!/bin/bash
2 2
3echo "[COMPILE ] assets/css/style.scss -> output/style.css" 3echo -e "\033[0;32m[COMPILE ]\033[0m assets/css/style.scss -> output/style.css"
4sassc assets/css/style.scss | node_modules/.bin/csso > output/style.css 4sassc assets/css/style.scss | node_modules/.bin/csso > output/style.css