From 7c60fa0c986c45717a865e179b5d692a7ab08e32 Mon Sep 17 00:00:00 2001 From: onefang Date: Fri, 3 Jan 2020 23:24:44 +1000 Subject: A few less steps in some of the time calcs. --- apt-panopticon.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'apt-panopticon.lua') diff --git a/apt-panopticon.lua b/apt-panopticon.lua index e9b1015..5797f91 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -853,10 +853,8 @@ local parseRelease = function(host) coroutine.yield() D('*>* Resumed coroutine while waiting on - not APT.checkFile(results_old/' .. fRp .. ')') end - local pkt = APT.exe([[TZ="GMT" date -d "$(grep '^Date:' results/]] .. fRp .. [[ | cut -d ' ' -f 2-)" '+%s']]):Do().result - pkt = tonumber(pkt:sub(2, -2)) - local new = APT.exe([[TZ="GMT" date -d "$(grep '^Date:' ]] .. fR .. [[.SORTED | cut -d ' ' -f 2-)" '+%s']]):Do().result - new = tonumber(new:sub(2, -2)) + local pkt = tonumber(APT.exe([[TZ="GMT" date -d "$(grep '^Date:' results/]] .. fRp .. [[ | cut -d ' ' -f 2-)" '+%s']]):Do().result:sub(2, -2)) + local new = tonumber(APT.exe([[TZ="GMT" date -d "$(grep '^Date:' ]] .. fR .. [[.SORTED | cut -d ' ' -f 2-)" '+%s']]):Do().result:sub(2, -2)) local upd = pkt + APT.mirrors[host].Updated local updd = pkt + (APT.mirrors[host].Updated * 1.5) -- Give the mirror time to actually do the update. if pkt > new then -- cgit v1.1