autoupdater: fix indentation
This commit is contained in:
parent
0425aecbec
commit
129b1146c3
|
@ -47,8 +47,8 @@ local function parse_args()
|
||||||
i = i+1
|
i = i+1
|
||||||
|
|
||||||
if not arg[i] then
|
if not arg[i] then
|
||||||
io.stderr:write("Error parsing command line: expected branch name\n")
|
io.stderr:write("Error parsing command line: expected branch name\n")
|
||||||
os.exit(1)
|
os.exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
branch_name = arg[i]
|
branch_name = arg[i]
|
||||||
|
@ -129,27 +129,27 @@ local function read_manifest(mirror)
|
||||||
for line in io.popen(string.format("wget -T 120 -O- '%s/%s.manifest'", mirror, branch.name), 'r'):lines() do
|
for line in io.popen(string.format("wget -T 120 -O- '%s/%s.manifest'", mirror, branch.name), 'r'):lines() do
|
||||||
if not sep then
|
if not sep then
|
||||||
if line == '---' then
|
if line == '---' then
|
||||||
sep = true
|
sep = true
|
||||||
else
|
else
|
||||||
table.insert(lines, line)
|
table.insert(lines, line)
|
||||||
|
|
||||||
if line == ('BRANCH=' .. branch.name) then
|
if line == ('BRANCH=' .. branch.name) then
|
||||||
branch_ok = true
|
branch_ok = true
|
||||||
end
|
end
|
||||||
|
|
||||||
local date = line:match('^DATE=(.+)$')
|
local date = line:match('^DATE=(.+)$')
|
||||||
local priority = line:match('^PRIORITY=([%d%.]+)$')
|
local priority = line:match('^PRIORITY=([%d%.]+)$')
|
||||||
local model, version, checksum, filename = line:match('^([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+)$')
|
local model, version, checksum, filename = line:match('^([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+)$')
|
||||||
|
|
||||||
if date then
|
if date then
|
||||||
ret.date = autoupdater_util.parse_date(date)
|
ret.date = autoupdater_util.parse_date(date)
|
||||||
elseif priority then
|
elseif priority then
|
||||||
ret.priority = tonumber(priority)
|
ret.priority = tonumber(priority)
|
||||||
elseif model == platform_info.get_image_name() then
|
elseif model == platform_info.get_image_name() then
|
||||||
ret.version = version
|
ret.version = version
|
||||||
ret.checksum = checksum
|
ret.checksum = checksum
|
||||||
ret.filename = filename
|
ret.filename = filename
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
table.insert(sigs, line)
|
table.insert(sigs, line)
|
||||||
|
|
Loading…
Reference in New Issue