[scripts] improve fault-tolerance of "equo update"

This commit is contained in:
Fabio Erculiani 2012-10-10 00:16:29 +02:00
parent a02968af22
commit 32384949a6
2 changed files with 12 additions and 4 deletions

View File

@ -11,12 +11,16 @@ fi
export FORCE_EAPI=2 export FORCE_EAPI=2
updated=0 updated=0
for ((i=0; i < 6; i++)); do for ((i=0; i < 12; i++)); do
equo update && { equo update && {
updated=1; updated=1;
break; break;
} }
sleep 1200 || exit 1 if [ ${i} -gt 6 ]; then
sleep 3600 || exit 1
else
sleep 1200 || exit 1
fi
done done
if [ "${updated}" = "0" ]; then if [ "${updated}" = "0" ]; then
exit 1 exit 1

View File

@ -8,12 +8,16 @@ rm -f /var/run/entropy/entropy.lock
export FORCE_EAPI=2 export FORCE_EAPI=2
updated=0 updated=0
for ((i=0; i < 6; i++)); do for ((i=0; i < 12; i++)); do
equo update && { equo update && {
updated=1; updated=1;
break; break;
} }
sleep 1200 || exit 1 if [ ${i} -gt 6 ]; then
sleep 3600 || exit 1
else
sleep 1200 || exit 1
fi
done done
if [ "${updated}" = "0" ]; then if [ "${updated}" = "0" ]; then
exit 1 exit 1