mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 03:59:52 +00:00
72bfe8ea63
When configure has been run with --with-pkgversion=xyz, the shell complains
about a missing ']' in this script.
Fixes: 2c273f32d3
("meson: generate qemu-version.h")
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
26 lines
405 B
Bash
Executable File
26 lines
405 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
dir="$1"
|
|
pkgversion="$2"
|
|
version="$3"
|
|
|
|
if [ -z "$pkgversion" ]; then
|
|
cd "$dir"
|
|
if [ -e .git ]; then
|
|
pkgversion=$(git describe --match 'v*' --dirty | echo "")
|
|
fi
|
|
fi
|
|
|
|
if [ -n "$pkgversion" ]; then
|
|
fullversion="$version ($pkgversion)"
|
|
else
|
|
fullversion="$version"
|
|
fi
|
|
|
|
cat <<EOF
|
|
#define QEMU_PKGVERSION "$pkgversion"
|
|
#define QEMU_FULL_VERSION "$fullversion"
|
|
EOF
|