blob: c394b59f68fa64e76bc6d6c183247a1b0d4e32e1 [file] [log] [blame]
# Copyright 2020 Texas Instruments Incorporated
"""A wrapper to run SysConfig.
This script provides a basic Python wrapper for GN integration.
Run with:
python run_sysconfig.py <path to SysConfig> <SysConfig args>
This script will attempt to run sh or cmd to run the wrapper scripts for the
SysConfig cmd line.
"""
import subprocess
import sys
# Select OS specific helper script
if sys.platform.startswith('linux'):
proc_call = [sys.argv[1] + '/sysconfig_cli.sh']
elif sys.platform.startswith('win'):
proc_call = [sys.argv[1] + '/sysconfig_cli.bat']
else:
# guess sh?
proc_call = [sys.argv[1] + '/sysconfig_cli.sh']
# Append cmd options
proc_call += sys.argv[2:]
# exec
subprocess.call(proc_call)