File: update_gitrevision.sh

package info (click to toggle)
portaudio19 19.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,980 kB
  • ctags: 13,089
  • sloc: ansic: 56,444; sh: 13,640; cpp: 10,851; java: 677; makefile: 339; python: 143
file content (17 lines) | stat: -rwxr-xr-x 502 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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}