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