build: Misc build system updates

This commit is contained in:
mintsuki
2024-07-28 05:16:33 +02:00
parent 65c6644797
commit fc7ae750d4
5 changed files with 80 additions and 36 deletions

View File

@@ -8,12 +8,12 @@ test -z "$srcdir" && srcdir=.
cd "$srcdir"
if [ -f version ]; then
if test -f version; then
printf '%s' "$(cat version)"
exit 0
fi
if ! [ -d .git ] || ! git log -n1 --pretty='%h' >/dev/null 2>&1; then
if ! test -d .git || ! git log -n1 --pretty='%h' >/dev/null 2>&1; then
printf 'UNVERSIONED'
exit 0
fi