summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-09-13 14:12:23 +0200
committerGerd Hoffmann <kraxel@redhat.com>2013-09-23 14:19:48 +0200
commitece025f5980bae88fa677bc9c0d24d2e580e205d (patch)
treeba347724f0e551d0dfcd025bdf01947271dfb91b
parent26014a242f78e69091dadfb9e8eb8c88579ff09f (diff)
downloadqemu-seabios-1.7.3-stable.tar.gz
fix buildversion.shrel-1.7.3.21.7.3-stable
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)
-rwxr-xr-xtools/buildversion.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/buildversion.sh b/tools/buildversion.sh
index c8c1725..e5ce96c 100755
--- a/tools/buildversion.sh
+++ b/tools/buildversion.sh
@@ -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`"