diff options
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon.lua | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 92a5125..430aa87 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -971,22 +971,24 @@ if 0 < #arg then | |||
971 | end | 971 | end |
972 | end | 972 | end |
973 | 973 | ||
974 | os.execute('sort -k 3 results/' .. pu.host .. '/merged/dists/' .. n .. '/Release >results/' .. pu.host .. '/merged/dists/' .. n .. '/Release.SORTED') | 974 | if checkFile('results/' .. pu.host .. '/merged/dists/' .. n .. '/Release') then |
975 | if options.referenceSite.value == pu.host then | 975 | os.execute('sort -k 3 results/' .. pu.host .. '/merged/dists/' .. n .. '/Release >results/' .. pu.host .. '/merged/dists/' .. n .. '/Release.SORTED') |
976 | os.execute('diff -U 0 results_old/pkgmaster.devuan.org/merged/dists/' .. n .. '/Release.SORTED ' .. | 976 | if options.referenceSite.value == pu.host then |
977 | 'results/pkgmaster.devuan.org/merged/dists/' .. n .. '/Release.SORTED ' .. | 977 | os.execute('diff -U 0 results_old/pkgmaster.devuan.org/merged/dists/' .. n .. '/Release.SORTED ' .. |
978 | '| grep -v "@@" | grep "^+" | grep "Packages.xz$" | cut -c 77- >results/NEW_Release_' .. n .. '.txt') | 978 | 'results/pkgmaster.devuan.org/merged/dists/' .. n .. '/Release.SORTED ' .. |
979 | os.execute('rm results/' .. pu.host .. '/merged/dists/' .. n .. '/Release') | 979 | '| grep -v "@@" | grep "^+" | grep "Packages.xz$" | cut -c 77- >results/NEW_Release_' .. n .. '.txt') |
980 | os.execute('rm -f results/' .. pu.host .. '/merged/dists/' .. n .. '/Release 2>/dev/null') | ||
980 | -- TODO - Maybe check the date in Release, though since they are updated daily, is there any point? Perhaps it's for checking amprolla got run? | 981 | -- TODO - Maybe check the date in Release, though since they are updated daily, is there any point? Perhaps it's for checking amprolla got run? |
981 | else | 982 | else |
982 | -- TODO - compare to the pkgmaster copy. | 983 | -- TODO - compare to the pkgmaster copy. |
983 | end | 984 | end |
984 | 985 | ||
985 | local dfile, e = io.open('results/NEW_Release_' .. n .. '.txt', "r") | 986 | local dfile, e = io.open('results/NEW_Release_' .. n .. '.txt', "r") |
986 | if nil == dfile then W("opening results/NEW_Release_" .. n .. " file - " .. e) else | 987 | if nil == dfile then W("opening results/NEW_Release_" .. n .. " file - " .. e) else |
987 | local diff = dfile:read("*a") | 988 | local diff = dfile:read("*a") |
988 | if "" ~= diff then | 989 | if "" ~= diff then |
989 | downloads(pu.host, pu.path, n, diff) | 990 | downloads(pu.host, pu.path, n, diff) |
991 | end | ||
990 | end | 992 | end |
991 | end | 993 | end |
992 | 994 | ||