diff options
author | onefang | 2019-12-29 22:48:13 +1000 |
---|---|---|
committer | onefang | 2019-12-29 22:48:13 +1000 |
commit | 4e4180fb5c2df8515b7c5c3baa7396a9dbb93ad9 (patch) | |
tree | eafe75f99d537efa2c4415f7fc1aa6ae48ce4ac4 | |
parent | Big refactor of the email / web report. (diff) | |
download | apt-panopticon-4e4180fb5c2df8515b7c5c3baa7396a9dbb93ad9.zip apt-panopticon-4e4180fb5c2df8515b7c5c3baa7396a9dbb93ad9.tar.gz apt-panopticon-4e4180fb5c2df8515b7c5c3baa7396a9dbb93ad9.tar.bz2 apt-panopticon-4e4180fb5c2df8515b7c5c3baa7396a9dbb93ad9.tar.xz |
Re archive the rest as well.
-rwxr-xr-x | apt-panopticon-update-data.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apt-panopticon-update-data.lua b/apt-panopticon-update-data.lua index cf0d83b..8251c9d 100755 --- a/apt-panopticon-update-data.lua +++ b/apt-panopticon-update-data.lua | |||
@@ -139,5 +139,15 @@ for l in files:lines() do | |||
139 | os.execute('mkdir -p ' .. l:sub(1, 18) .. '; tar -c --xz ' .. l:sub(1, 24) .. ' -f ' .. l:sub(1, 18) .. '/' .. l .. '; rm -fr ' .. l:sub(1, 24) .. '; rm -f ' .. l) | 139 | os.execute('mkdir -p ' .. l:sub(1, 18) .. '; tar -c --xz ' .. l:sub(1, 24) .. ' -f ' .. l:sub(1, 18) .. '/' .. l .. '; rm -fr ' .. l:sub(1, 24) .. '; rm -f ' .. l) |
140 | end | 140 | end |
141 | 141 | ||
142 | local rslt = APT.exe( 'ls -dl results | cut -d " " -f 11'):Do().result:sub(2, -2) | ||
143 | local rslto = APT.exe( 'ls -dl results_old | cut -d " " -f 11'):Do().result:sub(2, -2) | ||
144 | local files = io.popen('ls -d1 results_*-*-*-*-* 2>/dev/null') | ||
145 | for l in files:lines() do | ||
146 | if (rslt ~= l) and (rslto ~= l) then | ||
147 | if -1 < APT.verbosity then io.stdout:write('\r' .. 'tar -c --xz ' .. l:sub(1, 24) .. ' -f ' .. l:sub(1, 18) .. '/' .. l .. '.tar.xz'); io.stdout:flush() end | ||
148 | os.execute('mkdir -p ' .. l:sub(1, 18) .. '; tar -c --xz ' .. l:sub(1, 24) .. ' -f ' .. l:sub(1, 18) .. '/' .. l .. '; rm -fr ' .. l:sub(1, 24) .. '; rm -f ' .. l) | ||
149 | end | ||
150 | end | ||
151 | |||
142 | 152 | ||
143 | if -1 < APT.verbosity then print('\nFinished updating data.') end | 153 | if -1 < APT.verbosity then print('\nFinished updating data.') end |