small fix

git-svn-id: svn://kolibrios.org@5102 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse 2014-09-12 16:22:57 +00:00
parent 7b7ab9316d
commit 30de08ace6

View File

@ -581,17 +581,11 @@ tup.definerule{inputs = input_deps, command =
outputs = {"kolibri.iso"}} outputs = {"kolibri.iso"}}
-- generate command and dependencies for distribution kit -- generate command and dependencies for distribution kit
input_deps = {"kolibri.img"} cp = "cp %f %o"
output_deps = {"distribution_kit/kolibri.img"} tup.definerule{inputs = {"kolibri.img"}, command = cp, outputs = {"distribution_kit/kolibri.img"}}
make_distr_command = "ln -sr kolibri.img distribution_kit/kolibri.img"
for i,v in ipairs(distr_extra_files) do for i,v in ipairs(distr_extra_files) do
make_distr_command = make_distr_command .. ' && ln -sr "`realpath "' .. v[2] .. '"`" "distribution_kit/' .. v[1] .. '"'
table.insert(input_deps, v[2])
if string.sub(v[1], -1) == "/" if string.sub(v[1], -1) == "/"
then table.insert(output_deps, "distribution_kit/" .. v[1] .. tup.file(v[2])) then tup.definerule{inputs = v[2], command = cp, outputs = {"distribution_kit/" .. v[1] .. tup.file(v[2])}}
else table.insert(output_deps, "distribution_kit/" .. v[1]) else tup.definerule{inputs = v[2], command = cp, outputs = {"distribution_kit/" .. v[1]}}
end end
end end
-- generate tup rule for distribution kit
tup.definerule{inputs = input_deps, command = make_distr_command, outputs = output_deps}