Add retries for make in start-kubemark

This commit is contained in:
gmarek 2016-05-30 16:51:30 +02:00
parent 60c1b4e75f
commit 5109776485

View File

@ -57,7 +57,19 @@ fi
CURR_DIR=`pwd`
cd "${MAKE_DIR}"
make
RETRIES=3
for attempt in $(seq 1 ${RETRIES}); do
if ! make; then
if [[ $((attempt)) -eq "${RETRIES}" ]]; then
echo "${color_red}Make failed. Exiting.${color_norm}"
exit 1
fi
echo -e "${color_yellow}Make attempt $(($attempt)) failed. Retrying.${color_norm}" >& 2
sleep $(($attempt * 5))
else
break
fi
done
rm kubemark
cd $CURR_DIR