Permalink
Browse files

[fix] git_version: should fix problem with opa version = 0

  • Loading branch information...
Aqua-Ye committed Nov 22, 2011
1 parent 62b1c37 commit 990ce10949fe2a6f730299daa91dd7f4417a2378
Showing with 13 additions and 1 deletion.
  1. +13 −1 buildinfos/generate_buildinfos.sh
@@ -87,7 +87,19 @@ git_opalang_version_cmd () {
is_git_root () {
LOOKED_FOR_REPO=$1
- [ -d .git ] && git remote show -n origin | grep -q 'URL:.*'$LOOKED_FOR_REPO
+ P=`pwd`
+ # in case we are in another sub-dir, for instance _buuild...
+ cd $ROOTDIR
+ if [ "$LOOKED_FOR_REPO" != "$ROOT_REPO" ]; then
+ cd $PATH_TO_REPOS/$LOOKED_FOR_REPO
+ fi
+ if [ -d .git ] && git remote show -n origin | grep -q 'URL:.*'$LOOKED_FOR_REPO; then
+ cd $P
+ return 0
+ else
+ cd $P
+ return 1
+ fi
}
in_repo () {

0 comments on commit 990ce10

Please sign in to comment.