diff options
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 430aa87..3afe3a1 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -1098,9 +1098,13 @@ if 0 < #arg then | |||
1098 | logPost() | 1098 | logPost() |
1099 | logFile:close() | 1099 | logFile:close() |
1100 | else | 1100 | else |
1101 | local fadt = io.popen("ls -dl results_old 2>/dev/null | cut -d '>' -f 2 | cut -d ' ' -f 2") | ||
1102 | local adt = fadt:read('*l') | ||
1103 | fadt:close() | ||
1104 | if 0 ~= #adt then os.execute('tar -c --xz ' .. adt .. ' -f ' .. adt .. '.tar.xz') end | ||
1101 | local dt = os.date('!%Y-%m-%d-%H-%M') | 1105 | local dt = os.date('!%Y-%m-%d-%H-%M') |
1102 | local fodt = io.popen('TZ="GMT" date -r results/stamp +%Y-%m-%d-%H-%M', 'r') | 1106 | local fodt = io.popen('TZ="GMT" date -r results/stamp +%Y-%m-%d-%H-%M', 'r') |
1103 | odt = fodt:read('*l') | 1107 | local odt = fodt:read('*l') |
1104 | fodt:close() | 1108 | fodt:close() |
1105 | os.execute(' rm -f results_old; ln -s results_' .. odt .. ' results_old 2>/dev/null') | 1109 | os.execute(' rm -f results_old; ln -s results_' .. odt .. ' results_old 2>/dev/null') |
1106 | os.execute('mkdir -p results_' .. dt .. '; rm -f results; ln -s results_' .. dt .. ' results 2>/dev/null') | 1110 | os.execute('mkdir -p results_' .. dt .. '; rm -f results; ln -s results_' .. dt .. ' results 2>/dev/null') |
@@ -1156,6 +1160,8 @@ else | |||
1156 | end | 1160 | end |
1157 | end | 1161 | end |
1158 | 1162 | ||
1163 | if 0 ~= #adt then os.execute('rm -fr ' .. adt .. ' 2>/dev/null') end | ||
1164 | |||
1159 | logPost() | 1165 | logPost() |
1160 | logFile:close() | 1166 | logFile:close() |
1161 | end | 1167 | end |