From fe7d80580c56e3d8387e6bddf59da282e00c1b13 Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Wed, 24 Mar 2010 13:33:58 +0100 Subject: [PATCH 1/1] git-update: Fix and restructure logic --- scripts/git-update.sh | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/scripts/git-update.sh b/scripts/git-update.sh index bb028d6..0c53f96 100755 --- a/scripts/git-update.sh +++ b/scripts/git-update.sh @@ -63,29 +63,30 @@ build() { if test -d $1; then cd $1 - if test ! -e Makefile -a -e autoregen.sh + if test ! -e Makefile then - echo "+ $1: autoregen.sh" - ./autoregen.sh > "$tmp/$1-regen.log" 2>&1 - if test $? -ne 0 - then - echo "$1: autoregen.sh [$tmp/$1-regen.log]" >> $ERROR_LOG - cd .. - return $ERROR_RETURN - fi - echo "+ $1: autoregen.sh done" - fi - else if test ! -e Makefile - then - echo "+ $1: autogen.sh" - ./autogen.sh > "$tmp/$1-gen.log" 2>&1 - if test $? -ne 0 + if test -e autoregen.sh then - echo "$1: autogen.sh [$tmp/$1-gen.log]" >> $ERROR_LOG - cd .. - return $ERROR_RETURN + echo "+ $1: autoregen.sh" + ./autoregen.sh > "$tmp/$1-regen.log" 2>&1 + if test $? -ne 0 + then + echo "$1: autoregen.sh [$tmp/$1-regen.log]" >> $ERROR_LOG + cd .. + return $ERROR_RETURN + fi + echo "+ $1: autoregen.sh done" + else + echo "+ $1: autogen.sh" + ./autogen.sh > "$tmp/$1-gen.log" 2>&1 + if test $? -ne 0 + then + echo "$1: autogen.sh [$tmp/$1-gen.log]" >> $ERROR_LOG + cd .. + return $ERROR_RETURN + fi + echo "+ $1: autogen.sh done" fi - echo "+ $1: autogen.sh done" fi echo "+ $1: make" -- 2.7.4