annotate src/portaudio_20161030/update_gitrevision.sh @ 140:59a8758c56b1

Add source for PortAudio stable v190600_20161030
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 03 Jan 2017 13:44:07 +0000
parents
children
rev   line source
cannam@140 1 #!/bin/bash
cannam@140 2 #
cannam@140 3 # Write the Git commit SHA to an include file.
cannam@140 4 # This should be run before compiling code on Linux or Macintosh.
cannam@140 5 #
cannam@140 6 revision_filename=src/common/pa_gitrevision.h
cannam@140 7
cannam@140 8 # Run git first to make sure it is installed before corrupting the
cannam@140 9 # include file.
cannam@140 10 git rev-parse HEAD
cannam@140 11
cannam@140 12 # Update the include file with the current Git revision.
cannam@140 13 echo -n "#define PA_GIT_REVISION " > ${revision_filename}
cannam@140 14 git rev-parse HEAD >> ${revision_filename}
cannam@140 15
cannam@140 16 echo ${revision_filename} now contains
cannam@140 17 cat ${revision_filename}