blob: 15d5f5dd6de1cddd2c227174fd4978274944baa6 [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
ret = subprocess.call(proc_call)
sys.exit(ret)