git-update: Fix and restructure logic

This commit is contained in:
Robert Swain 2010-03-24 13:33:58 +01:00
parent 3b4aa3f76a
commit fe7d80580c

View file

@ -63,7 +63,9 @@ build()
{ {
if test -d $1; then if test -d $1; then
cd $1 cd $1
if test ! -e Makefile -a -e autoregen.sh if test ! -e Makefile
then
if test -e autoregen.sh
then then
echo "+ $1: autoregen.sh" echo "+ $1: autoregen.sh"
./autoregen.sh > "$tmp/$1-regen.log" 2>&1 ./autoregen.sh > "$tmp/$1-regen.log" 2>&1
@ -74,9 +76,7 @@ build()
return $ERROR_RETURN return $ERROR_RETURN
fi fi
echo "+ $1: autoregen.sh done" echo "+ $1: autoregen.sh done"
fi else
else if test ! -e Makefile
then
echo "+ $1: autogen.sh" echo "+ $1: autogen.sh"
./autogen.sh > "$tmp/$1-gen.log" 2>&1 ./autogen.sh > "$tmp/$1-gen.log" 2>&1
if test $? -ne 0 if test $? -ne 0
@ -87,6 +87,7 @@ build()
fi fi
echo "+ $1: autogen.sh done" echo "+ $1: autogen.sh done"
fi fi
fi
echo "+ $1: make" echo "+ $1: make"
make > "$tmp/$1-make.log" 2>&1 make > "$tmp/$1-make.log" 2>&1