# HG changeset patch # User Matthew Wild # Date 1248663579 -3600 # Node ID cb8b48b08e1ea47c507306c20bfac9c725a5e9d4 # Parent bbfbc08d568f30641bbc6220335713f54deca1a9 Only add a module to the list once, no matter how many times it is added in the squishy file diff -r bbfbc08d568f -r cb8b48b08e1e squish.lua --- 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