From 218b7dbae6cc98dd7fa891f329c99c68ef3a978c Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Fri, 7 Jan 2022 13:15:02 -0600 Subject: [PATCH] Added coloured output --- CheckIntegrity | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CheckIntegrity b/CheckIntegrity index 78cb3fc..554d885 100644 --- a/CheckIntegrity +++ b/CheckIntegrity @@ -1,7 +1,8 @@ #!/bin/sh # formatting -bold=$(tput bold) +red=$(tput setaf 1) +green=$(tput setaf 2) normal=$(tput sgr0) # error function @@ -19,7 +20,7 @@ error(){ f="$1sum $2 | cut -d ' ' -f1" if [ $(eval $f) = "$3" ]; then - echo "$2 is ${bold}fine.${normal}" + echo "$2 is ${green}fine.${normal}" else - echo "$2 is ${bold}corrupted!${normal}" + echo "$2 is ${red}corrupted!${normal}" fi