update bash excecution in run

This commit is contained in:
Mats van Reenen 2022-09-11 12:54:27 +02:00 committed by GitHub
parent b7990dc035
commit 5c442e5aad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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