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.

18 lines
502B

  1. #!/bin/bash
  2. #
  3. # Write the Git commit SHA to an include file.
  4. # This should be run before compiling code on Linux or Macintosh.
  5. #
  6. revision_filename=src/common/pa_gitrevision.h
  7. # Run git first to make sure it is installed before corrupting the
  8. # include file.
  9. git rev-parse HEAD
  10. # Update the include file with the current Git revision.
  11. echo -n "#define PA_GIT_REVISION " > ${revision_filename}
  12. git rev-parse HEAD >> ${revision_filename}
  13. echo ${revision_filename} now contains
  14. cat ${revision_filename}