summaryrefslogtreecommitdiffstats
path: root/tools/build-pkg.lua
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2016-02-21 13:41:51 (GMT)
committerBoris Nagaev <bnagaev@gmail.com>2016-04-20 20:35:13 (GMT)
commitd25a31bd2183f101d6836af54ed8eafbd9057700 (patch)
tree463a2e8c4f003b5b46ee32be800379b9b19b8319 /tools/build-pkg.lua
parent1856ae5f8aef881a0dde8df71e1bedef4b6e83d4 (diff)
downloadmxe-d25a31bd2183f101d6836af54ed8eafbd9057700.zip
mxe-d25a31bd2183f101d6836af54ed8eafbd9057700.tar.gz
mxe-d25a31bd2183f101d6836af54ed8eafbd9057700.tar.bz2
build-pkg: move function isBuilt()
It will be used in buildItem()
Diffstat (limited to 'tools/build-pkg.lua')
-rwxr-xr-xtools/build-pkg.lua24
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua
index e866abc..7a7172f 100755
--- a/tools/build-pkg.lua
+++ b/tools/build-pkg.lua
@@ -548,6 +548,18 @@ local function removeEmptyDirs(item)
end
end
+local function isBuilt(item, files)
+ local target, pkg = parseItem(item)
+ local INSTALLED = 'usr/%s/installed/%s'
+ local installed = INSTALLED:format(target, pkg)
+ for _, file in ipairs(files) do
+ if file == installed then
+ return true
+ end
+ end
+ return false
+end
+
-- builds package, returns list of new files
local function buildItem(item, item2deps, file2item, item2index, pass)
gitCheckout(
@@ -692,18 +704,6 @@ local function makeDeb(item, files, deps, ver)
makePackage(deb_pkg, files, deb_deps, ver, d1, d2)
end
-local function isBuilt(item, files)
- local target, pkg = parseItem(item)
- local INSTALLED = 'usr/%s/installed/%s'
- local installed = INSTALLED:format(target, pkg)
- for _, file in ipairs(files) do
- if file == installed then
- return true
- end
- end
- return false
-end
-
local function findForeignInstalls(item, files)
for _, file in ipairs(files) do
local pattern = 'usr/([^/]+)/installed/([^/]+)'