Added sanity check, exit if pull or clone failed

This commit is contained in:
Nico Schottelius 2005-12-07 15:47:35 +01:00
commit 0f0a48ab3c

View file

@ -6,10 +6,15 @@
# Install latest git and cogito to $INSTALL_PREFIX/$name and # Install latest git and cogito to $INSTALL_PREFIX/$name and
# link the binaries to $BINDIR # link the binaries to $BINDIR
# Needs git and cogito to work! # Needs git and cogito to work!
# And:
# - libexpat-dev
# - libcurl3-dev
# - libssl-dev
# - libz-dev
BASE_GET=http://www.kernel.org/pub/scm/ BASE_GET=http://www.kernel.org/pub/scm/
PROJECTS="git/git.git cogito/cogito.git" PROJECTS="git/git.git cogito/cogito.git"
BUILDDIR=/home/nico/build BUILDDIR=/home/user/nico/build
INSTALL_PREFIX=/usr/packages INSTALL_PREFIX=/usr/packages
BINDIR=/usr/local/bin BINDIR=/usr/local/bin
@ -34,6 +39,11 @@ for project in $PROJECTS; do
cg-update origin cg-update origin
fi fi
if [ $? -ne 0 ]; then
echo "Pull or clone failed, aborting now."
exit 23
fi
cd "$BUILDDIR/$realname" cd "$BUILDDIR/$realname"
version=$(cg-object-id) version=$(cg-object-id)
echo "Installing $realname (Version: $version)" echo "Installing $realname (Version: $version)"