diff options
author | Eric Engestrom <eric@engestrom.ch> | 2017-07-06 20:25:28 +0100 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2017-07-06 22:59:39 +0100 |
commit | 076faf8764d3cd8038145286f7533d0a18e82476 (patch) | |
tree | a7dc59a9fff663e8a06a11750e3a6f62b10950df /bin | |
parent | bab03c06fc79ec5624982777684d0c5f123c127c (diff) |
build systems: move git_sha1_gen.sh to bin/
There was no reason for this script to live outside the scripts
directory.
Suggested-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/git_sha1_gen.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/git_sha1_gen.sh b/bin/git_sha1_gen.sh new file mode 100755 index 0000000000..898e590758 --- /dev/null +++ b/bin/git_sha1_gen.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# run git from the sources directory +cd "$(dirname "$0")" + +# don't print anything if git fails +if ! git_sha1=$(git --git-dir=../.git rev-parse --short=10 HEAD 2>/dev/null) +then + exit +fi + +printf '#define MESA_GIT_SHA1 "git-%s"\n' "$git_sha1" |