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 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts/build_content.sh') 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 -- cgit v1.2.3-70-g09d2