Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

extract_git_sha1 400B

12345678910
  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