[PATCH] fix buildversion.sh

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> --- scripts/buildversion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildversion.sh b/scripts/buildversion.sh index c8c1725..e5ce96c 100755 --- a/scripts/buildversion.sh +++ b/scripts/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`" -- 1.8.3.1

On Fr, 2013-09-13 at 14:21 +0200, Gerd Hoffmann wrote:
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.
Committed now. cheers, Gerd
participants (1)
-
Gerd Hoffmann