You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
684 B

#!/usr/bin/env python3
4 years ago
import os, platform, sys
4 years ago
basePath = os.path.dirname( os.path.realpath( __file__ ) )
4 years ago
scripts = {
"Darwin" : "Install/InstallDarwin.sh",
"Linux" : "Install/InstallLinux.sh",
"Windows" : "Install\\InstallWindows.ps1",
}
4 years ago
command = '"' + os.path.join( basePath, scripts[ platform.system() ] ) + '"'
4 years ago
arguments = ' ' + ' '.join( sys.argv[ 1: ] )
4 years ago
if platform.system() == "Windows":
command = "powershell.exe -noprofile -executionpolicy bypass -File " + command
4 years ago
arguments = arguments.replace( "--", "-" )
4 years ago
command += arguments
4 years ago
print( command )
4 years ago
if os.system( command ) != 0:
print( "Command exited with error." )
raise SystemExit( 1 )