Chris@55: #!/bin/bash Chris@55: # Chris@55: # Write the Git commit SHA to an include file. Chris@55: # This should be run before compiling code on Linux or Macintosh. Chris@55: # Chris@55: revision_filename=src/common/pa_gitrevision.h Chris@55: Chris@55: # Run git first to make sure it is installed before corrupting the Chris@55: # include file. Chris@55: git rev-parse HEAD Chris@55: Chris@55: # Update the include file with the current Git revision. Chris@55: echo -n "#define PA_GIT_REVISION " > ${revision_filename} Chris@55: git rev-parse HEAD >> ${revision_filename} Chris@55: Chris@55: echo ${revision_filename} now contains Chris@55: cat ${revision_filename}