From a2d91f9f6812ae5ee29d00f7132e9ad983e3141b Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 26 Dec 2020 11:02:17 +0100 Subject: Improved build script output --- scripts/build_content.sh | 12 ++++++------ scripts/build_fonts.sh | 4 ++-- scripts/build_sass.sh | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'scripts') 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 () { mkdir -p $(dirname "$TARGET") if [ "${1#*.}" = "md" ]; then - echo "[COMPILE ] $1 -> $TARGET" + echo -e "\033[0;32m[COMPILE ]\033[0m $1 -> $TARGET" pandoc "$1" \ -f markdown \ @@ -22,7 +22,7 @@ handle () { -o "$TARGET" \ --metadata-file metadata/metadata.json else - echo "[ COPY ] $1 -> $TARGET" + echo -e "\033[0;32m[COPY ]\033[0m $1 -> $TARGET" cp "$1" "$TARGET" fi @@ -45,18 +45,18 @@ elif [ "$1" = "md" ]; then done elif [ "$1" = "single" ]; then if [ -z "$2" ]; then - echo "[ ERROR ] \"single\" operation requires file argument" + echo -e "\033[0;31m[ERROR ]\033[0m \"single\" operation requires file argument" else handle "$2" fi elif [ "$1" = "delete" ]; then if [ -z "$2" ]; then - echo "[ ERROR ] \"delete\" operation requires file argument" + echo -e "\033[0;31m[ERROR ]\033[0m \"delete\" operation requires file argument" else TARGET=$(target "$2") - echo "[ DELETE ] $2 -> $TARGET" + echo -e "\033[0;32m[DELETE ]\033[0m $2 -> $TARGET" rm -rf $TARGET fi else - echo "[ ERROR ] Unknown operation: \"$1\"" + echo -e "\033[0;31m[ERROR ]\033[0m Unknown operation: \"$1\"" 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 @@ #!/bin/bash -echo "[ MINIFY ] assets/fonts/iosevka-term-ss09-regular.ttf -> output/iosevka-term-ss09-regular.woff2" +echo -e "\033[0;32m[MINIFY ]\033[0m assets/fonts/iosevka-term-ss09-regular.ttf -> output/iosevka-term-ss09-regular.woff2" pyftsubset assets/fonts/iosevka-term-ss09-regular.ttf \ --text-file='assets/fonts/glyphs.txt' \ @@ -8,7 +8,7 @@ pyftsubset assets/fonts/iosevka-term-ss09-regular.ttf \ --flavor='woff2' \ --output-file='output/iosevka-term-ss09-regular.woff2' -echo "[ MINIFY ] assets/fonts/iosevka-term-ss09-bold.ttf -> output/iosevka-term-ss09-bold.woff2" +echo -e "\033[0;32m[MINIFY ]\033[0m assets/fonts/iosevka-term-ss09-bold.ttf -> output/iosevka-term-ss09-bold.woff2" pyftsubset assets/fonts/iosevka-term-ss09-bold.ttf \ --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 @@ #!/bin/bash -echo "[COMPILE ] assets/css/style.scss -> output/style.css" +echo -e "\033[0;32m[COMPILE ]\033[0m assets/css/style.scss -> output/style.css" sassc assets/css/style.scss | node_modules/.bin/csso > output/style.css -- cgit v1.2.3-70-g09d2