OLD | NEW |
| (Empty) |
1 import os | |
2 import os.path | |
3 import sys | |
4 | |
5 output = sys.argv[1] | |
6 parentdir = os.path.abspath(os.path.join(output, os.pardir)) | |
7 | |
8 #The original body of this file is generated by this bash script: | |
9 # | |
10 #touch "${DIR}/git_sha1.h.tmp" | |
11 #if test -d .git; then \ | |
12 # if which git > /dev/null; then \ | |
13 # git log -n 1 --oneline | \ | |
14 # sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \ | |
15 # > "${DIR}/git_sha1.h.tmp" ; \ | |
16 # fi \ | |
17 # fi | |
18 #if ! cmp -s "${DIR}/git_sha1.h.tmp" "${DIR}/git_sha1.h"; then \ | |
19 # mv "${DIR}/git_sha1.h.tmp" "${DIR}/git_sha1.h" ;\ | |
20 # else \ | |
21 # rm "${DIR}/git_sha1.h.tmp" ;\ | |
22 # fi | |
23 # | |
24 #However, Chromium shouldn't depend on Bash, and this preprocessor macro isn't | |
25 #neccessary in the first place | |
26 | |
27 if not os.path.isdir(parentdir): | |
28 os.makedirs(parentdir) | |
29 | |
30 with open(output, "w") as f: | |
31 pass | |
OLD | NEW |