diff options
author | Boris Nagaev <bnagaev@gmail.com> | 2015-09-11 08:43:47 (GMT) |
---|---|---|
committer | Boris Nagaev <bnagaev@gmail.com> | 2015-09-12 05:59:44 (GMT) |
commit | e48e09ae0b4819c106ff8dee5db8b31b8c7887af (patch) | |
tree | 5704aa98686abd701e8ac8dea64482b154012a59 /tools | |
parent | ac470ea0da30f270b3df80988f36f0e4bc4aa192 (diff) | |
download | mxe-e48e09ae0b4819c106ff8dee5db8b31b8c7887af.zip mxe-e48e09ae0b4819c106ff8dee5db8b31b8c7887af.tar.gz mxe-e48e09ae0b4819c106ff8dee5db8b31b8c7887af.tar.bz2 |
build-pkg: report not existing files
See #842
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/build-pkg.lua | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua index 78d36c5..1a2a303 100755 --- a/tools/build-pkg.lua +++ b/tools/build-pkg.lua @@ -122,6 +122,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 @@ -227,7 +237,9 @@ local function gitStatus() local status, file = line:match('(..) (.*)') status = trim(status) 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 |