Browse Source

[build] Update provision scripts deprecated Premake code.

pull/940/head
Joao Matos 8 years ago
parent
commit
6443e811c3
  1. 18
      build/scripts/Provision.lua

18
build/scripts/Provision.lua

@ -2,11 +2,11 @@ require "Utils"
function download_ninja() function download_ninja()
local system = ""; local system = "";
if os.is("windows") then if os.ishost("windows") then
system = "win" system = "win"
elseif os.is("macosx") then elseif os.ishost("macosx") then
system = "mac" system = "mac"
elseif os.is("linux") then elseif os.ishost("linux") then
system = "linux" system = "linux"
else else
error("Error downloading Ninja for unknown system") error("Error downloading Ninja for unknown system")
@ -27,11 +27,11 @@ end
function download_cmake() function download_cmake()
local system = ""; local system = "";
if os.is("windows") then if os.ishost("windows") then
system = "win32-x86.zip" system = "win32-x86.zip"
elseif os.is("macosx") then elseif os.ishost("macosx") then
system = "Darwin-x86_64.dmg" system = "Darwin-x86_64.dmg"
elseif os.is("linux") then elseif os.ishost("linux") then
system = "Linux-x86_64.sh" system = "Linux-x86_64.sh"
else else
error("Error downloading CMake for unknown system") error("Error downloading CMake for unknown system")
@ -56,7 +56,7 @@ function download_nuget()
end end
function restore_nuget_packages() function restore_nuget_packages()
local nugetexe = os.is("windows") and "NuGet.exe" or "mono ./NuGet.exe" local nugetexe = os.ishost("windows") and "NuGet.exe" or "mono ./NuGet.exe"
execute(nugetexe .. " restore packages.config -PackagesDirectory " .. depsdir) execute(nugetexe .. " restore packages.config -PackagesDirectory " .. depsdir)
end end
@ -106,9 +106,9 @@ if _ACTION == "cmake" then
end end
if _ACTION == "provision" then if _ACTION == "provision" then
if os.is("linux") then if os.ishost("linux") then
provision_linux() provision_linux()
elseif os.is("macosx") then elseif os.ishost("macosx") then
provision_osx() provision_osx()
end end
os.exit() os.exit()

Loading…
Cancel
Save