mirror of
https://github.com/SinTan1729/CheckIntegrity.git
synced 2024-12-26 08:38:35 -06:00
Added coloured output
This commit is contained in:
parent
58adc128ab
commit
218b7dbae6
1 changed files with 4 additions and 3 deletions
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# formatting
|
# formatting
|
||||||
bold=$(tput bold)
|
red=$(tput setaf 1)
|
||||||
|
green=$(tput setaf 2)
|
||||||
normal=$(tput sgr0)
|
normal=$(tput sgr0)
|
||||||
|
|
||||||
# error function
|
# error function
|
||||||
|
@ -19,7 +20,7 @@ error(){
|
||||||
f="$1sum $2 | cut -d ' ' -f1"
|
f="$1sum $2 | cut -d ' ' -f1"
|
||||||
|
|
||||||
if [ $(eval $f) = "$3" ]; then
|
if [ $(eval $f) = "$3" ]; then
|
||||||
echo "$2 is ${bold}fine.${normal}"
|
echo "$2 is ${green}fine.${normal}"
|
||||||
else
|
else
|
||||||
echo "$2 is ${bold}corrupted!${normal}"
|
echo "$2 is ${red}corrupted!${normal}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue