Merge remote branch 'origin/master' into pipe-video
[mesa.git] / bin / extract_git_sha1
1 #!/bin/sh
2 touch src/mesa/main/git_sha1.h
3 if which git > /dev/null; then
4 # Extract the 7-digit "short" SHA1 for the current HEAD, convert
5 # it to a string, and wrap it in a #define. This is used in
6 # src/mesa/main/version.c to put the GIT SHA1 in the GL_VERSION string.
7 git log -n 1 --oneline |\
8 sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
9 > src/mesa/main/git_sha1.h
10 fi