]> xenbits.xensource.com Git - seabios.git/commitdiff
fix buildversion.sh 1.7.3-stable upstream/1.7.3-stable rel-1.7.3.2
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 13 Sep 2013 12:12:23 +0000 (14:12 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 23 Sep 2013 12:19:48 +0000 (14:19 +0200)
Recent git versions place the submodule git repos into the
.git/modules directory of the toplevel repo.  In that case
.git of the seabios tree isn't a directory, but a regular
file, saying where the gitdir is.

Extent the git check to also allow .git being a regular file,
so buildversion.sh works correctly when called within the qemu
submodule.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 0b3607f89ac24f84f8b22ffaadb4f0fd111bda24)

tools/buildversion.sh

index c8c1725efb0dfe9e3f10b33f529a90922523f800..e5ce96c6a70c52389c25759835fdb148e5378940 100755 (executable)
@@ -4,7 +4,7 @@ OUTFILE="$1"
 VAR16MODE="$2"
 
 # Extract version info
-if [ -d .git ]; then
+if [ -d .git -o -f .git ]; then
     VERSION="`git describe --tags --long --dirty`"
 elif [ -f .version ]; then
     VERSION="`cat .version`"