From 73d0fcdc2859eb271231f425c980a590eed97a5e Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Thu, 18 Mar 2021 10:55:50 +0100 Subject: [PATCH] Color 'bootstrap.sh' only if stdout is a terminal --- bootstrap.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 0d5a34e7d0..e915387cd3 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -9,10 +9,12 @@ # Bootstrap script for running ReFrame from source # -BLUE='\033[0;34m' -GREEN='\033[0;32m' -YELLOW='\033[0;33m' -NC='\033[0m' +if [ -t 1 ]; then + BLUE='\033[0;34m' + GREEN='\033[0;32m' + YELLOW='\033[0;33m' + NC='\033[0m' +fi CMD() {