diff options
author | Alexandre Oliva <oliva@lsd.ic.unicamp.br> | 2012-11-26 13:13:45 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-11-26 15:04:08 -0800 |
commit | a37c34debdfc6277d5829ab96190b03e87acea4d (patch) | |
tree | dd49fcb3c71a9207b08f5607030db266e86ec191 | |
parent | 74b2a2d9641b6b1d3572d4706fa0cae34ea9e130 (diff) | |
download | ceph-a37c34debdfc6277d5829ab96190b03e87acea4d.tar.gz |
Search for srcdir/.git in check_version
Support srcdir != . looking for .git in srcdir when computing the ceph
release and git tag.
Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-rwxr-xr-x | src/check_version | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/check_version b/src/check_version index e31ca498dab..8600c556f4c 100755 --- a/src/check_version +++ b/src/check_version @@ -1,12 +1,13 @@ #!/bin/sh -if [ ! -d ../.git ]; then - echo "not updating .git_version (no ../.git)" +dname=`dirname $0` + +if [ ! -d $dname/../.git ]; then + echo "not updating .git_version (no $dname/../.git)" exit 0 fi -dname=`dirname $0` -cur=`git rev-parse HEAD 2>/dev/null; git describe 2>/dev/null` +cur=`cd $dname && git rev-parse HEAD 2>/dev/null; git describe 2>/dev/null` [ -e $1 ] && old=`cat $1` if [ "$cur" != "$old" ]; then |