1
0
Fork 0

bam.lua: allow TARGET_OS to be set from CLI, fallback on host.

This commit is contained in:
Henrik Hautakoski 2020-12-28 19:10:10 +01:00
parent 707cd7732c
commit d9697e2eae

View file

@ -3,6 +3,7 @@
-- Spectre build config --
-- --
--------------------------------
Import(".bam/utils.lua")
Import(".bam/functions.lua")
CheckVersion("0.5")
@ -12,9 +13,10 @@ CheckVersion("0.5")
-- --
--------------------------------
-- OS Detection
TARGET_OS = system()
if TARGET_OS == nil then
-- Target specified on command line or get host system.
TARGET_OS = ScriptArgs.target or system()
if not valid_system(TARGET_OS) then
print ("System not supported" )
print ("Supported systems are: " .. supported_systems() )
return 1