add color

This commit is contained in:
Mats van Reenen 2022-09-09 20:32:09 +02:00 committed by GitHub
parent 9703185495
commit c9dee7218e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,9 +4,9 @@ function run(){
echo "# $1" >>install.log
echo "> $2" >>install.log
$2 &>>install.log \
&& echo -e "\e[1A\e[K[ OK ] $1" \
&& echo -e "\e[1A\e[K[ \e[32mOK\e[0m ] $1" \
|| {
echo -e "\e[1A\e[K[FAIL] $1"
echo -e "\e[1A\e[K[\e[31mFAIL\e[0m] $1"
$3
exit
}