From 685556ae84036fb84a363cbb8872264e8e54dbfc Mon Sep 17 00:00:00 2001 From: Emanuele Torre Date: Sun, 18 Apr 2021 17:25:46 +0200 Subject: [PATCH] Toolchain/BuildIt.sh: let's have colours on macOS too :^) MacOS's sed doesn't support "\x1b" expansion unlike GNU sed, but we can still use bash's $'\x1b' to expand it. --- Toolchain/BuildIt.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index b0f7cf7f6a4..9133c122f2c 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -80,11 +80,7 @@ GCC_BASE_URL="http://ftp.gnu.org/gnu/gcc" buildstep() { NAME=$1 shift - if [ "$SYSTEM_NAME" = "Darwin" ]; then - "$@" 2>&1 | sed 's|^|['"${NAME}"'] |' - else - "$@" 2>&1 | sed 's|^|\x1b[34m['"${NAME}"']\x1b[39m |' - fi + "$@" 2>&1 | sed $'s|^|\x1b[34m['"${NAME}"$']\x1b[39m |' } # === CHECK CACHE AND REUSE ===