1
0
Fork 0
qemu/scripts/qemu-version.sh
Daniel Baumann ea34ddeea6
Adding upstream version 1:10.0.2+ds.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-22 14:27:05 +02:00

25 lines
400 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) || :
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