From: Jan-Benedict G. <jb...@us...> - 2005-12-16 11:50:37
|
Update of /cvsroot/linux-vax/toolchain/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7787 Modified Files: update_upstream_cvs_sandboxes.sh Log Message: - Try updating the sandboxes several times (5x, right now). Index: update_upstream_cvs_sandboxes.sh =================================================================== RCS file: /cvsroot/linux-vax/toolchain/scripts/update_upstream_cvs_sandboxes.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- update_upstream_cvs_sandboxes.sh 28 Oct 2005 17:08:07 -0000 1.5 +++ update_upstream_cvs_sandboxes.sh 16 Dec 2005 11:50:28 -0000 1.6 @@ -1,12 +1,12 @@ #!/bin/sh -set -e - if [ ! -d "${UPSTREAM_SANDBOXES_PATH}" ]; then echo "\$UPSTREAM_SANDBOXES_PATH isn't set--please source vax_toolchain_config to set it" >&2 exit 1 fi +MAX_TRIES=5 + # # CVS managed archives # @@ -15,10 +15,19 @@ glibc/ports-upstream-HEAD \ linux/linux-upstream-HEAD; do pushd "${UPSTREAM_SANDBOXES_PATH}/${COMPONENT}" - if ! cvs -z9 update -d -P; then - echo "Failed to update $COMPONENT" >&2 - exit 1 - fi + for i in `seq 1 "${MAX_TRIES}"`; do + echo "Updating ${COMPONENT}, try #${i}..." + cvs -z9 update -d -P + RET=$? + if [ "${RET}" -eq 0 ]; then + break + else + if [ "${i}" -eq "${MAX_TIES}" ]; then + echo "Failed ${MAX_TRIES} times to update ${COMPONENT}" >&2 + exit 1 + fi + fi + done popd done @@ -28,10 +37,20 @@ for COMPONENT in uclibc/uclibc-upstream-HEAD \ gcc/gcc-upstream-HEAD; do pushd "${UPSTREAM_SANDBOXES_PATH}/${COMPONENT}" - if ! svn update; then - echo "Failed to update $COMPONENT" >&2 - exit 1 - fi + for i in `seq 1 "${MAX_TRIES}"`; do + echo "Updating ${COMPONENT}, try #${i}..." + svn update + RET=$? + if [ "${RET}" -eq 0 ]; then + break + else + svn cleanup + if [ "${i}" -eq "${MAX_TIES}" ]; then + echo "Failed ${MAX_TRIES} times to update ${COMPONENT}" >&2 + exit 1 + fi + fi + done popd done |