setup_toolchain.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:buildroot 作者: flutter 项目源码 文件源码
def CopyTool(source_path):
  """Copies the given tool to the current directory, including a warning not
  to edit it."""
  with open(source_path) as source_file:
    tool_source = source_file.readlines()

  # Add header and write it out to the current directory (which should be the
  # root build dir).
  out_path = 'gyp-mac-tool'
  with open(out_path, 'w') as tool_file:
    tool_file.write(''.join([tool_source[0],
                             '# Generated by setup_toolchain.py do not edit.\n']
                            + tool_source[1:]))
  st = os.stat(out_path)
  os.chmod(out_path, st.st_mode | stat.S_IEXEC)

# Find the tool source, it's the first argument, and copy it.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号