From d5514e8e1c911e22f409a336d5db1791e3853b5f Mon Sep 17 00:00:00 2001 From: Thomas Desveaux Date: Wed, 1 May 2019 19:07:39 +0200 Subject: [PATCH] Package: Bootstrap Premake in cloned repository --- scripts/package.lua | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/scripts/package.lua b/scripts/package.lua index ce33860b..05258325 100644 --- a/scripts/package.lua +++ b/scripts/package.lua @@ -88,22 +88,31 @@ os.rmdir(pkgName) print("Cloning source code") - z = os.executef("git clone .. %s", pkgName) + local z = execQuiet("git clone .. %s -b %s --recurse-submodules", pkgName, branch) if not z then error("clone failed", 0) end os.chdir(pkgName) - z = os.executef("git checkout %s", branch) - if not z then - error("unable to checkout branch " .. branch, 0) - end +-- +-- Bootstrap Premake in the newly cloned repository +-- - z = os.executef("git submodule update --init") - if not z then - error("unable to clone submodules", 0) + print("Bootstraping Premake...") + if os.ishost("windows") then + z = execQuiet("Bootstrap.bat") + else + local os_map = { + linux = "linux", + macosx = "osx", + } + z = execQuiet("make -j -f Bootstrap.mak %s", os_map[os.host()]) end + if not z then + error("Failed to Bootstrap Premake", 0) + end + local premakeBin = path.translate("bin/release/Premake5") --