From 7366440bc620f98434d4296fe003e152ba607429 Mon Sep 17 00:00:00 2001 From: Alexander Demidov Date: Mon, 13 Jan 2014 17:05:59 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20push-upd?= =?UTF-8?q?ate=2006?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- push-update.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/push-update.sh b/push-update.sh index 6b753e8..6539338 100755 --- a/push-update.sh +++ b/push-update.sh @@ -40,11 +40,11 @@ MESSAGE="\nUpdate ${PATH_LIB} on ${VERSION}\n" CURRENT_DIR=`pwd` for project in "${PROJECTS[@]}" do - echo -e "\nUpdate lib for ${project}...\n" + echo -e "Update lib for ${project}...\n" (cd "${project}${PATH_LIB}" && - git fetch > /dev/null && - git checkout $VERSION 2> /dev/null) || - (echo -e "\nFailed to checkout lib on tag ${VERSION}\n" && + git fetch >/dev/null 2>/dev/null && + git checkout $VERSION 2>/dev/null) || + (echo -e "Failed to checkout lib on tag ${VERSION}\n" && exit 1) cd "${project}" git diff-index --quiet HEAD "`echo ${PATH_LIB#'/'}`" @@ -54,20 +54,20 @@ do (git reset > /dev/null && git add "`echo ${PATH_LIB#'/'}`" > /dev/null && git commit -m $MESSAGE > /dev/null) || - (echo -e "\nFailed to update lib for ${project}\n" && + (echo -e "Failed to update lib for ${project}\n" && exit 1) if [ $project == "/var/www/d753_common" ] then (git push origin master > /dev/null && cd /var/www/d753/ && ./merge-from-master.sh > /dev/null cd /var/www/d753_10ballov/ && ./merge-from-master.sh > /dev/null) || - (echo -e "\nFailed to update dependency d753 branches... Please resolve that problem by hand\n" && + (echo -e "Failed to update dependency d753 branches... Please resolve that problem by hand\n" && exit 1) fi else - echo -e "\nAlready update\n" + echo -e "Already update\n" fi done -echo -e "\nAll operations succeed\n" +echo -e "All operations succeed\n" exit 0 \ No newline at end of file