diff src/portaudio_20161030_catalina_patch/update_gitrevision.sh @ 162:d43aab368df9

Duplicate for patch testing
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 30 Oct 2019 11:25:10 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/portaudio_20161030_catalina_patch/update_gitrevision.sh	Wed Oct 30 11:25:10 2019 +0000
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# Write the Git commit SHA to an include file.
+# This should be run before compiling code on Linux or Macintosh.
+#
+revision_filename=src/common/pa_gitrevision.h
+
+# Run git first to make sure it is installed before corrupting the
+# include file.
+git rev-parse HEAD
+
+# Update the include file with the current Git revision.
+echo -n "#define PA_GIT_REVISION " > ${revision_filename}
+git rev-parse HEAD >> ${revision_filename}
+
+echo ${revision_filename} now contains
+cat ${revision_filename}