From 3d69eb3c345df9e675a9571c4a1c0a7b6fa8ddb8 Mon Sep 17 00:00:00 2001 From: Alexander Demidov Date: Mon, 13 Jan 2014 16:07:31 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B0=20push-upd?= =?UTF-8?q?ate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- push-update.sh | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/push-update.sh b/push-update.sh index c6e970a..68a5ad3 100755 --- a/push-update.sh +++ b/push-update.sh @@ -1,15 +1,9 @@ -#!/bin/sh +#!/bin/bash PATH_LIB='/lib/Image' -array=('/var/www/10ballov','/var/www/predelanet','/var/www/zelenoemore','/var/www/d753_common') - -if [ ! -a CHANGELOG.md ] -then - echo 'File CHANGELOG.md not exists.' - exit 1 -fi -if [ test -n CHANGELOG.md ] +PROJECTS=( "/var/www/10ballov" "/var/www/predelanet" "/var/www/zelenoemore" "/var/www/d753_common" ) +if [ ! test -n CHANGELOG.md ] then - echo 'CHANGELOG.md is empty.' + echo 'CHANGELOG.md not exists or empty.' exit 1 fi git diff-index --quiet HEAD -- @@ -35,7 +29,7 @@ git push > /dev/null || exit 1 MESSAGE="Update ${PATH_LIB} on ${VERSION}" CURRENT_DIR=`pwd` -for project in "${array[@]}" +for project in "${PROJECTS[@]}" do echo "Update lib for ${i}...\n" (cd "${project}${PATH_LIB}" &&