build: Convert git_sha1_gen script to Python.
Python is the scripting language we've been using for scripts that need to run across all supported platforms. Shell is *not* a portable language for scripts. Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import filecmp
|
||||
import os
|
||||
import subprocess
|
||||
from sys import executable as python_cmd
|
||||
|
||||
Import('*')
|
||||
|
||||
@@ -25,7 +26,7 @@ def write_git_sha1_h_file(filename):
|
||||
|
||||
tempfile = "git_sha1.h.tmp"
|
||||
with open(tempfile, "w") as f:
|
||||
args = [ 'sh', Dir('#').abspath + '/bin/git_sha1_gen.sh' ]
|
||||
args = [ python_cmd, Dir('#').abspath + '/bin/git_sha1_gen.py' ]
|
||||
try:
|
||||
subprocess.Popen(args, stdout=f).wait()
|
||||
except:
|
||||
|
Reference in New Issue
Block a user