Added sanity check, exit if pull or clone failed
This commit is contained in:
parent
a1ad5cd344
commit
0f0a48ab3c
1 changed files with 11 additions and 1 deletions
|
|
@ -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)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue