diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2011-05-05 22:37:22 +0200 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2011-05-05 13:49:21 -0700 |
commit | a041525ed9718a0f48f402a6161fafe857cc4ce4 (patch) | |
tree | 64466ed6f007d0e5f4d6a7c807cd267279541762 /bin | |
parent | 02a6c9428d2ebb0ba121533f6bd7a0f2fe58c615 (diff) |
mesa: don't call git if it's not git repository
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/extract_git_sha1 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/extract_git_sha1 b/bin/extract_git_sha1 index 5e635d4b74..828387016b 100755 --- a/bin/extract_git_sha1 +++ b/bin/extract_git_sha1 @@ -3,6 +3,10 @@ if [ ! -f src/mesa/main/git_sha1.h ]; then touch src/mesa/main/git_sha1.h fi +if [ ! -d .git ]; then + exit +fi + if which git > /dev/null; then # Extract the 7-digit "short" SHA1 for the current HEAD, convert # it to a string, and wrap it in a #define. This is used in |