Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Commit 0eefc46

Browse files
committed
build-all.sh: Use variables for color escape codes
[skip ci] Requested-by: Nick Desaulniers <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]>
1 parent 7b6ba79 commit 0eefc46

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build-all.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ function format_time() {(
1515
)}
1616

1717
BLD_ALL_START=$(date +%s)
18+
GREEN="\033[01;32m"
19+
RED="\033[01;31m"
20+
RESET="\033[0m"
1821

1922
echo
2023
grep "env:" .travis.yml | grep -v LLVM_VERSION | sed "s/.*env: //g" | while read -r ITEM; do (
@@ -30,9 +33,9 @@ grep "env:" .travis.yml | grep -v LLVM_VERSION | sed "s/.*env: //g" | while read
3033

3134
echo -e "Running '${ARCH:+ARCH=${ARCH} }${LD:+LD=${LD} }${REPO:+REPO=${REPO} }./driver.sh'... \c"
3235
if ! ./driver.sh "${@}" &>/dev/null; then
33-
echo -e "\033[01;31mFailed\033[0m\c"
36+
echo -e "${RED}Failed${RESET}\c"
3437
else
35-
echo -e "\033[01;32mSuccessful\033[0m\c"
38+
echo -e "${GREEN}Successful${RESET}\c"
3639
fi
3740
echo " in $(format_time "${DRIVER_START}" "$(date +%s)")"
3841
) done

0 commit comments

Comments
 (0)