Add ICU message format support
[chromium-blink-merge.git] / third_party / mesa / generate_git_sha1.py
blob5e41c852ab123591bc11abc01ff6ec3ad6e4c7a5
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import os
6 import os.path
7 import sys
9 output = sys.argv[1]
10 parentdir = os.path.abspath(os.path.join(output, os.pardir))
12 #The original body of this file is generated by this bash script:
14 #touch "${DIR}/git_sha1.h.tmp"
15 #if test -d .git; then \
16 # if which git > /dev/null; then \
17 # git log -n 1 --oneline | \
18 # sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
19 # > "${DIR}/git_sha1.h.tmp" ; \
20 # fi \
21 # fi
22 #if ! cmp -s "${DIR}/git_sha1.h.tmp" "${DIR}/git_sha1.h"; then \
23 # mv "${DIR}/git_sha1.h.tmp" "${DIR}/git_sha1.h" ;\
24 # else \
25 # rm "${DIR}/git_sha1.h.tmp" ;\
26 # fi
28 #However, Chromium shouldn't depend on Bash, and this preprocessor macro isn't
29 #neccessary in the first place
31 if not os.path.isdir(parentdir):
32 os.makedirs(parentdir)
34 with open(output, "w") as f:
35 pass