uvg266/tools/version.sh
Ricardo Constantino c515796a21 Only use version prefix in kvazaar binary
Fixes regression since 54f08f2 causing libkvazaar version checks to not
work (i.e. pkg-config)
2016-03-09 16:13:59 +00:00

13 lines
259 B
Bash
Executable file

#!/bin/sh
cd "$(dirname "$0")"
cd ..
if type git >/dev/null 2>/dev/null && [ -d .git ]; then
version="$(git describe --dirty --tags --match 'v*')"
else
version="v$(awk '/#define KVZ_VERSION/ { print $3 }' src/global.h)"
fi
printf '%s\n' "$version"