Mon, 27 Jul 2009 03:59:39 +0100
Only add a module to the list once, no matter how many times it is added in the squishy file
squish.lua | file | annotate | diff | comparison | revisions |
--- a/squish.lua Mon Jul 27 03:54:38 2009 +0100 +++ b/squish.lua Mon Jul 27 03:59:39 2009 +0100 @@ -38,8 +38,13 @@ -- Functions to be called from squishy file -- function Module(name) + if modules[name] then + print_verbose("Ignoring duplicate module definition for "..name); + return function () end + end local i = #modules+1; modules[i] = { name = name, url = ___fetch_url }; + modules[name] = modules[i]; return function (path) modules[i].path = path; end