[roboptim-commit] [SCM] roboptim branch, core, updated. 949b12c4ebde27fea142e290f4a09e1f43df9c4e
Status: Beta
Brought to you by:
flamiraux
From: Thomas M. <tho...@us...> - 2009-07-02 03:02:52
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "roboptim". The branch, core has been updated via 949b12c4ebde27fea142e290f4a09e1f43df9c4e (commit) from 357a763385b186f91bd52db2ae568c222403ac4d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 949b12c4ebde27fea142e290f4a09e1f43df9c4e Author: Thomas Moulard <tho...@gm...> Date: Thu Jul 2 11:56:54 2009 +0900 Check that git is newer enough. * bootstrap: Require at least git 1.5.5. Signed-off-by: Thomas Moulard <tho...@gm...> diff --git a/ChangeLog b/ChangeLog index fede1ca..d068042 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-07-02 Thomas Moulard <tho...@gm...> + Check that git is newer enough. + * bootstrap: Require at least git 1.5.5. + +2009-07-02 Thomas Moulard <tho...@gm...> + Enhance bootstrap to handle submodules. * bootstrap: Retrieve submodules automatically. diff --git a/bootstrap b/bootstrap index cded300..98280fe 100755 --- a/bootstrap +++ b/bootstrap @@ -21,8 +21,33 @@ die_nosourceforgealias () die "no \`\`sourceforge:'' alias in your git configuration." } +# Check that git version is newer enough. +check_git_version () +{ + version=`git --version | sed 's/^git version \([0-9]\.[0-9]\.[0-9]\).*$/\1/'` + + if test x"$version" = x; then + die "failed to parse git version" + fi + + for i in 1 2 3; do + wantedversion=`echo "$1" | cut -d'.' -f$i` + gitversion=`echo "$version" | cut -d'.' -f$i` + + if test $gitversion -lt $wantedversion; then + die "git version is too old (version $1 at least is required)" + fi + if test $gitversion -gt $wantedversion; then + return + fi + done +} + # Make sure that the submodule are retrieved. if test -d ".git"; then + # Url rewriting has been introduced in git 1.5.5. + check_git_version "1.5.5" + if test x`git config -l | grep 'url\..*\.insteadof=sourceforge:'` = x; then die_nosourceforgealias fi ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 +++++ bootstrap | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 0 deletions(-) hooks/post-receive -- roboptim |