From fda76465bb99efc6a0d2683932eeace5e6516926 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Thu, 1 Jul 2010 16:58:50 +0200 Subject: [PATCH] don't fail on first error, but continue on other modules --- scripts/git-mirror.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/git-mirror.sh b/scripts/git-mirror.sh index 83f8e8c..1ddcd57 100755 --- a/scripts/git-mirror.sh +++ b/scripts/git-mirror.sh @@ -14,7 +14,6 @@ function msg () { function error () { echo "[ERROR] xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $1" - exit 1 } function run () { @@ -34,9 +33,7 @@ function run () { function mirror () { for arg in "$@" ; do - arg=$(basename $arg | sed s/.git$//g) - - NAME=$(echo ${arg} | sed 's/\/$//') + NAME=$(basename ${arg} | sed s/.git$//g) GIT_NAME=${NAME}.git REPO_DIR=${LOCAL_MIRROR_DIR}/${NAME} MIRROR_REPO=${MIRROR_GIT}/${GIT_NAME} @@ -65,10 +62,10 @@ function mirror () { if [ $? -ne 0 ] then error "Can not fetch from ${MIRROR_REPO}" + else + run "git push local_master" ${REPO_DIR} + run "git push --tags local_master" ${REPO_DIR} fi - - run "git push local_master" ${REPO_DIR} - run "git push --tags local_master" ${REPO_DIR} done } -- 2.43.0