mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 22:10:10 +01:00
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
12 lines
250 B
Bash
Executable file
12 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"
|