n=0
brew install opencv // command you would like to repeat
while [ $? -ne 0 ]
do
(( n++ ))
echo "Try to install opencv $n times"
date +"[%D,%R] install opencv failed"
brew install opencv // command you would like to repeat
done
(( n++ ))
echo "Try to install opencv $n times"
date +"[%D,%R] install opencv sucess"
# m=0
# pip install pygame
# while [ $? -ne 0 ]
# do
# (( m++ ))
# echo "Try to install pygame $m times"
# date +"[%D,%R] install pygame failed"
# pip install pygame
# done
# echo "Try to install pygame $m times"
# date +"[%D,%R] install pygame sucess"
网友评论