From 6e5a84d74b23648c08faa925803a6210522ca82c Mon Sep 17 00:00:00 2001 From: "Todd T. Fries" Date: Tue, 4 Oct 2011 10:36:13 -0500 Subject: let obj/ dirs work too --- buildver.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/buildver.sh b/buildver.sh index be2517b..879bedc 100755 --- a/buildver.sh +++ b/buildver.sh @@ -1,4 +1,7 @@ #!/bin/sh -if [ -d .git ]; then + +CURDIR=$(dirname $0) +if [ -d $CURDIR/.git ]; then + cd $CURDIR git describe --tags | tr -d '\n' fi -- cgit 1.4.1-2-gfad0