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.
This commit is contained in:
Emanuele Torre 2021-04-18 17:25:46 +02:00 committed by Linus Groh
parent 8b78f2741d
commit 685556ae84
Notes: sideshowbarker 2024-07-18 19:26:01 +09:00

View file

@ -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 ===