mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-28 08:20:54 +01:00
52f04eef82
- rename to VERSION to VGMSTREAM_VERSION to avoid some clashes - improve git-less builds
19 lines
335 B
Bash
Executable File
19 lines
335 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# echo current git version (doesn't make version.h)
|
|
|
|
# test if git exists
|
|
if ! command -v git > /dev/null
|
|
then
|
|
VERSION="unknown"
|
|
else
|
|
VERSION=$(git describe --always 2>&1 | tr : _ )
|
|
fi
|
|
|
|
# ignore git stderr "fatal:
|
|
if case $VERSION in fatal*) ;; *) false;; esac; then
|
|
echo "unknown"
|
|
else
|
|
echo "$VERSION"
|
|
fi;
|