Files
third_party_mesa3d/git_sha1_gen.sh
Eric Engestrom 3fd425aed7 build systems: uniformize git_sha1.h generation
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-29 16:24:58 +01:00

13 lines
250 B
Bash
Executable File

#!/bin/sh
# run git from the sources directory
cd "$(dirname "$0")"
# don't print anything if git fails
if ! git_sha1=$(git --git-dir=.git rev-parse --short=10 HEAD 2>/dev/null)
then
exit
fi
printf '#define MESA_GIT_SHA1 "git-%s"\n' "$git_sha1"