iotests: Test that qcow2's data-file is flushed
[qemu.git] / scripts / qemu-version.sh
blob03128c56a2ca688b94121d9fd1223c5ccad73125
1 #!/bin/sh
3 set -eu
5 dir="$1"
6 pkgversion="$2"
7 version="$3"
9 if [ -z "$pkgversion" ]; then
10 cd "$dir"
11 if [ -e .git ]; then
12 pkgversion=$(git describe --match 'v*' --dirty | echo "")
16 if [ -n "$pkgversion" ]; then
17 fullversion="$version ($pkgversion)"
18 else
19 fullversion="$version"
22 cat <<EOF
23 #define QEMU_PKGVERSION "$pkgversion"
24 #define QEMU_FULL_VERSION "$fullversion"
25 EOF