summaryrefslogtreecommitdiffstats
path: root/tools/build-pkg.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build-pkg.lua')
-rwxr-xr-xtools/build-pkg.lua14
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