Sat, 01 Nov 2014 23:34:21 +0000
Lua 5.2 compatibility hack
module("handlers.copy", package.seeall) require("dependency") require("log") function phase1(file, env) end function phase2(file, env) local src=path.join(env.paths.src, file) local dst=path.join(env.paths.dst, file) if dependency.simple_update_check(dst, {src}) then log.log("Copy "..file.."\n") local f = io.openX(src, 'r') local dstf = io.openX(dst, 'w') while true do local data=f:read(1024*1024) if not data then break end dstf:write(data) end end end