|
@ -75,8 +75,8 @@ getGithubPackages = (repo) -> |
|
|
--For sorting table values by alphabet |
|
|
--For sorting table values by alphabet |
|
|
compare = (a, b) -> |
|
|
compare = (a, b) -> |
|
|
for i = 1, math.min(#a, #b) |
|
|
for i = 1, math.min(#a, #b) |
|
|
if a:sub(i, i) ~= b:sub(i, i) |
|
|
|
|
|
return a:sub(i, i) < b:sub(i, i) |
|
|
|
|
|
|
|
|
if a\sub(i, i) ~= b\sub(i, i) |
|
|
|
|
|
return a\sub(i, i) < b\sub(i, i) |
|
|
|
|
|
|
|
|
return #a < #b |
|
|
return #a < #b |
|
|
|
|
|
|
|
@ -98,8 +98,8 @@ readFromFile = (path) -> |
|
|
io.stderr\write("Error while trying to read file at " .. path .. ": " .. msg) |
|
|
io.stderr\write("Error while trying to read file at " .. path .. ": " .. msg) |
|
|
return |
|
|
return |
|
|
|
|
|
|
|
|
serializedTableData = file:read("*a") |
|
|
|
|
|
file:close() |
|
|
|
|
|
|
|
|
serializedTableData = file\read("*a") |
|
|
|
|
|
file\close() |
|
|
return serial.unserialize(serializedTableData) or { -1 } |
|
|
return serial.unserialize(serializedTableData) or { -1 } |
|
|
|
|
|
|
|
|
readFromLocalInstallFile = -> |
|
|
readFromLocalInstallFile = -> |
|
@ -121,8 +121,8 @@ saveToInstalledPackagesFile = (installedPackages) -> |
|
|
return |
|
|
return |
|
|
|
|
|
|
|
|
sPacks = serial.serialize(installedPackages) |
|
|
sPacks = serial.serialize(installedPackages) |
|
|
file:write(sPacks) |
|
|
|
|
|
file:close() |
|
|
|
|
|
|
|
|
file\write(sPacks) |
|
|
|
|
|
file\close() |
|
|
|
|
|
|
|
|
listPackages = (filter) -> |
|
|
listPackages = (filter) -> |
|
|
filter = filter or false |
|
|
filter = filter or false |
|
|