diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_content.sh | 12 | ||||
-rwxr-xr-x | scripts/build_fonts.sh | 4 | ||||
-rwxr-xr-x | scripts/build_sass.sh | 2 |
3 files changed, 9 insertions, 9 deletions
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 |
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 -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 |
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 -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 |
60 | else | 60 | else |
61 | echo "[ ERROR ] Unknown operation: \"$1\"" | 61 | echo -e "\033[0;31m[ERROR ]\033[0m Unknown operation: \"$1\"" |
62 | fi | 62 | fi |
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 | ||
3 | echo "[ MINIFY ] assets/fonts/iosevka-term-ss09-regular.ttf -> output/iosevka-term-ss09-regular.woff2" | 3 | echo -e "\033[0;32m[MINIFY ]\033[0m assets/fonts/iosevka-term-ss09-regular.ttf -> output/iosevka-term-ss09-regular.woff2" |
4 | 4 | ||
5 | pyftsubset assets/fonts/iosevka-term-ss09-regular.ttf \ | 5 | pyftsubset 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 | ||
11 | echo "[ MINIFY ] assets/fonts/iosevka-term-ss09-bold.ttf -> output/iosevka-term-ss09-bold.woff2" | 11 | echo -e "\033[0;32m[MINIFY ]\033[0m assets/fonts/iosevka-term-ss09-bold.ttf -> output/iosevka-term-ss09-bold.woff2" |
12 | 12 | ||
13 | pyftsubset assets/fonts/iosevka-term-ss09-bold.ttf \ | 13 | pyftsubset 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 | ||
3 | echo "[COMPILE ] assets/css/style.scss -> output/style.css" | 3 | echo -e "\033[0;32m[COMPILE ]\033[0m assets/css/style.scss -> output/style.css" |
4 | sassc assets/css/style.scss | node_modules/.bin/csso > output/style.css | 4 | sassc assets/css/style.scss | node_modules/.bin/csso > output/style.css |