diff options
author | onefang | 2020-01-03 23:27:22 +1000 |
---|---|---|
committer | onefang | 2020-01-03 23:27:22 +1000 |
commit | 8f09a59744e51693a5654c26117bb72437fa390f (patch) | |
tree | 6186111805687441a6f21a1968e55392c93c44d2 | |
parent | This might finally fix the Updated test, but include some more debugging outp... (diff) | |
download | apt-panopticon-8f09a59744e51693a5654c26117bb72437fa390f.zip apt-panopticon-8f09a59744e51693a5654c26117bb72437fa390f.tar.gz apt-panopticon-8f09a59744e51693a5654c26117bb72437fa390f.tar.bz2 apt-panopticon-8f09a59744e51693a5654c26117bb72437fa390f.tar.xz |
Update the other use of !%s to match the last commit.
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon-update-data.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-panopticon-update-data.lua b/apt-panopticon-update-data.lua index 8251c9d..6a0ef47 100755 --- a/apt-panopticon-update-data.lua +++ b/apt-panopticon-update-data.lua | |||
@@ -9,7 +9,7 @@ local E = APT.E | |||
9 | local C = APT.C | 9 | local C = APT.C |
10 | local arg, sendArgs = APT.parseArgs({...}) | 10 | local arg, sendArgs = APT.parseArgs({...}) |
11 | 11 | ||
12 | local oldest = os.date('!%s') - (60 * 60) | 12 | local oldest = os.date('%s') - (60 * 60) |
13 | 13 | ||
14 | 14 | ||
15 | local lock = 'apt-panopticon.lock' | 15 | local lock = 'apt-panopticon.lock' |
@@ -22,7 +22,7 @@ local files = io.popen('ls -1 results_*/results_*.tar.xz 2>/dev/null; ls -1 resu | |||
22 | for l in files:lines() do | 22 | for l in files:lines() do |
23 | local lsub = l:sub(1, -8) | 23 | local lsub = l:sub(1, -8) |
24 | 24 | ||
25 | local dt = os.date('!%s', os.time{year = l:sub(-23, -20), month = l:sub(-18, -17), day = l:sub(-15, -14), hour = l:sub(-12, -11), min = l:sub(-9, -8)}) - (60 * 60) | 25 | local dt = os.date('%s', os.time{year = l:sub(-23, -20), month = l:sub(-18, -17), day = l:sub(-15, -14), hour = l:sub(-12, -11), min = l:sub(-9, -8)}) - (60 * 60) |
26 | if dt < oldest then oldest = dt; print('\nOldest time is ' .. oldest) end | 26 | if dt < oldest then oldest = dt; print('\nOldest time is ' .. oldest) end |
27 | 27 | ||
28 | if -1 < APT.verbosity then io.stdout:write('\r' .. 'tar -xf ' .. l); io.stdout:flush() end | 28 | if -1 < APT.verbosity then io.stdout:write('\r' .. 'tar -xf ' .. l); io.stdout:flush() end |
@@ -102,7 +102,7 @@ local files = io.popen('ls -d1 results_*') | |||
102 | for l in files:lines() do | 102 | for l in files:lines() do |
103 | if ('results_old' ~= l) and ('.tar.xz' ~= l:sub(25, -1)) then | 103 | if ('results_old' ~= l) and ('.tar.xz' ~= l:sub(25, -1)) then |
104 | if APT.checkFile(l .. '/stamp') then | 104 | if APT.checkFile(l .. '/stamp') then |
105 | APT.now = os.date('!%s', os.time{year = l:sub(9, 12), month = l:sub(14, 15), day = l:sub(17, 18), hour = l:sub(20, 21), min = l:sub(23, 24)}) | 105 | APT.now = os.date('%s', os.time{year = l:sub(9, 12), month = l:sub(14, 15), day = l:sub(17, 18), hour = l:sub(20, 21), min = l:sub(23, 24)}) |
106 | if 0 ~= APT.now then | 106 | if 0 ~= APT.now then |
107 | if APT.checkFile(l .. '/mirrors.lua') then | 107 | if APT.checkFile(l .. '/mirrors.lua') then |
108 | if -1 < APT.verbosity then io.stdout:write('\r' .. l .. ' -> ' .. APT.now); io.stdout:flush() end | 108 | if -1 < APT.verbosity then io.stdout:write('\r' .. l .. ' -> ' .. APT.now); io.stdout:flush() end |