squish.lua

changeset 37
cb8b48b08e1e
parent 34
0e34461ab2a6
child 38
903128a42604
--- 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

mercurial