autobuild: fix 'execl: Argument list too long'

Make a command to build kolibri.raw a few kB shorter.

git-svn-id: svn://kolibrios.org@9427 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Ivan Baravy 2021-12-16 18:54:50 +00:00
parent d5cbb62ef5
commit 3ba48914da

View File

@ -942,13 +942,10 @@ for i,v in ipairs(raw_files) do
raw_file = v[1] raw_file = v[1]
local_file = v[2] local_file = v[2]
if raw_file ~= "/" then cur_dir = ""
slash_pos = 0 for dir in string.gmatch(raw_file, "([^/]+)/") do
while true do cur_dir = cur_dir .. "/" .. string.upper(dir)
slash_pos = string.find(raw_file, '/', slash_pos + 1) raw_dirs[cur_dir] = true
if not slash_pos then break end
table.insert(raw_dirs, string.sub(raw_file, 1, slash_pos - 1))
end
end end
-- tup does not want to see hidden files as dependencies -- tup does not want to see hidden files as dependencies
@ -957,17 +954,16 @@ for i,v in ipairs(raw_files) do
end end
end end
-- img_files and extra_files have some common dirs with different case -- Sorting is needed to mkdir /one before /one/two
for i,d in ipairs(raw_dirs) do raw_dirs_sorted = {}
raw_dirs[i] = string.upper(raw_dirs[i]) for k in pairs(raw_dirs) do table.insert(raw_dirs_sorted, k) end
end table.sort(raw_dirs_sorted)
raw_dirs = raw_dirs_sorted
-- make folders -- make folders
table.sort(raw_dirs) table.sort(raw_dirs)
for i,v in ipairs(raw_dirs) do for _, dir in pairs(raw_dirs) do
if v ~= raw_dirs[i-1] then make_raw_command = make_raw_command .. ' && mmd -i kolibri.raw@@1M "::' .. dir .. '"'
make_raw_command = make_raw_command .. ' && mmd -i kolibri.raw@@1M "::' .. v .. '"'
end
end end
-- copy files -- copy files