aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-12-05 04:09:08 +1000
committeronefang2019-12-05 04:09:08 +1000
commitf3d074986c8a0c5eb9a8e5ae769e247f871b8251 (patch)
tree3905f1fd9fb9816993871cf58eb0b15b5107a8fa
parentOops, fix up the extra greyness. (diff)
downloadapt-panopticon-f3d074986c8a0c5eb9a8e5ae769e247f871b8251.zip
apt-panopticon-f3d074986c8a0c5eb9a8e5ae769e247f871b8251.tar.gz
apt-panopticon-f3d074986c8a0c5eb9a8e5ae769e247f871b8251.tar.bz2
apt-panopticon-f3d074986c8a0c5eb9a8e5ae769e247f871b8251.tar.xz
Various little cleanups.
-rwxr-xr-xapt-panopticon.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index cf95a8e..2a65d0b 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -973,7 +973,8 @@ if 0 < #arg then
973 end 973 end
974 end 974 end
975 975
976 if checkFile('results/' .. pu.host .. '/merged/dists/' .. n .. '/Release') then 976 if checkFile('results/' .. pu.host .. '/merged/dists/' .. n .. '/Release') and
977 checkFile('results_old/pkgmaster.devuan.org/merged/dists/' .. n .. '/Release.SORTED') then
977 os.execute('sort -k 3 results/' .. pu.host .. '/merged/dists/' .. n .. '/Release >results/' .. pu.host .. '/merged/dists/' .. n .. '/Release.SORTED') 978 os.execute('sort -k 3 results/' .. pu.host .. '/merged/dists/' .. n .. '/Release >results/' .. pu.host .. '/merged/dists/' .. n .. '/Release.SORTED')
978 if options.referenceSite.value == pu.host then 979 if options.referenceSite.value == pu.host then
979 os.execute('diff -U 0 results_old/pkgmaster.devuan.org/merged/dists/' .. n .. '/Release.SORTED ' .. 980 os.execute('diff -U 0 results_old/pkgmaster.devuan.org/merged/dists/' .. n .. '/Release.SORTED ' ..
@@ -1103,13 +1104,13 @@ else
1103 local fadt = io.popen("ls -dl results_old 2>/dev/null | cut -d '>' -f 2 | cut -d ' ' -f 2") 1104 local fadt = io.popen("ls -dl results_old 2>/dev/null | cut -d '>' -f 2 | cut -d ' ' -f 2")
1104 local adt = fadt:read('*l') 1105 local adt = fadt:read('*l')
1105 fadt:close() 1106 fadt:close()
1106 if 0 ~= #adt then os.execute('tar -c --xz ' .. adt .. ' -f ' .. adt .. '.tar.xz') end 1107 if nil ~= adt then os.execute('tar -c --xz ' .. adt .. ' -f ' .. adt .. '.tar.xz') end
1107 local dt = os.date('!%Y-%m-%d-%H-%M') 1108 local dt = os.date('!%Y-%m-%d-%H-%M')
1108 local fodt = io.popen('TZ="GMT" date -r results/stamp +%Y-%m-%d-%H-%M', 'r') 1109 local fodt = io.popen('TZ="GMT" date -r results/stamp +%Y-%m-%d-%H-%M 2>/dev/null', 'r')
1109 local odt = fodt:read('*l') 1110 local odt = fodt:read('*l')
1110 fodt:close() 1111 fodt:close()
1111 os.execute(' rm -f results_old; ln -s results_' .. odt .. ' results_old 2>/dev/null') 1112 if nil ~= odt then os.execute(' rm -f results_old; ln -s results_' .. odt .. ' results_old 2>/dev/null') end
1112 os.execute('mkdir -p results_' .. dt .. '; rm -f results; ln -s results_' .. dt .. ' results 2>/dev/null') 1113 if nil ~= dt then os.execute('mkdir -p results_' .. dt .. '; rm -f results; ln -s results_' .. dt .. ' results 2>/dev/null') end
1113 os.execute('if [ -f results/stamp ]; then mv results/stamp results/stamp.old; else touch results/stamp.old -t 199901010000; fi; touch results/stamp') 1114 os.execute('if [ -f results/stamp ]; then mv results/stamp results/stamp.old; else touch results/stamp.old -t 199901010000; fi; touch results/stamp')
1114 os.execute("rm -f results/*.check 2>/dev/null") 1115 os.execute("rm -f results/*.check 2>/dev/null")
1115 if not keep then 1116 if not keep then
@@ -1162,7 +1163,7 @@ else
1162 end 1163 end
1163 end 1164 end
1164 1165
1165 if 0 ~= #adt then os.execute('rm -fr ' .. adt .. ' 2>/dev/null') end 1166 if nil ~= adt then os.execute('rm -fr ' .. adt .. ' 2>/dev/null') end
1166 1167
1167 logPost() 1168 logPost()
1168 logFile:close() 1169 logFile:close()