diff options
author | Tony Theodore <tonyt@logyst.com> | 2015-09-12 06:19:54 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2015-09-12 06:19:54 (GMT) |
commit | 4dfb2c2c138eb61cc4b0675c0dbb10d73185f1fd (patch) | |
tree | 16c241e53c770f91e6a94eb9f7973067aaa724cd /tools | |
parent | 67e7285e15f57a7a703ede47c047744800eeabe3 (diff) | |
parent | 71eff46710309cbc47ea8ab91bf2db6f1cb05f6e (diff) | |
download | mxe-4dfb2c2c138eb61cc4b0675c0dbb10d73185f1fd.zip mxe-4dfb2c2c138eb61cc4b0675c0dbb10d73185f1fd.tar.gz mxe-4dfb2c2c138eb61cc4b0675c0dbb10d73185f1fd.tar.bz2 |
Merge pull request #845 from LuaAndC/build-pkg-fix-filenames-with-spaces
Build pkg fix filenames with spaces
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/build-pkg.lua | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua index 3d62b0d..d7864d6 100755 --- a/tools/build-pkg.lua +++ b/tools/build-pkg.lua @@ -135,6 +135,16 @@ local function shell(cmd) return text end +local function fileExists(name) + local f = io.open(name, "r") + if f ~= nil then + io.close(f) + return true + else + return false + end +end + -- return several tables describing packages -- * list of packages -- * map from package to list of deps @@ -239,8 +249,14 @@ local function gitStatus() for line in git_st:lines() do local status, file = line:match('(..) (.*)') status = trim(status) + if file:sub(1, 1) == '"' then + -- filename with a space is quoted by git + file = file:sub(2, -2) + end file = 'usr/' .. file - if not isBlacklisted(file) then + if not fileExists(file) then + log('Missing file: %q', file) + elseif not isBlacklisted(file) then if status == 'A' then table.insert(new_files, file) elseif status == 'M' then |