lua-platform-info: allow . character in image names
Additionally, multiple . will be collapsed to one, and combinations of - and . with at least one - will be replaced by a single -
This commit is contained in:
parent
3d91fb8537
commit
78927d65a2
|
@ -33,5 +33,5 @@ end
|
|||
|
||||
-- The image name for sysupgrades
|
||||
function get_image_name()
|
||||
return (model:lower():gsub('[^%w]+', '-'):gsub('%-+$', ''))
|
||||
return (model:lower():gsub('[^%w%.]+', '-'):gsub('%.+', '.'):gsub('[%-%.]*%-[%-%.]*', '-'):gsub('%-+$', ''))
|
||||
end
|
||||
|
|
|
@ -33,5 +33,5 @@ end
|
|||
|
||||
-- The image name for sysupgrades
|
||||
function get_image_name()
|
||||
return (model:lower():gsub('[^%w]+', '-'):gsub('%-+$', ''))
|
||||
return (model:lower():gsub('[^%w%.]+', '-'):gsub('%.+', '.'):gsub('[%-%.]*%-[%-%.]*', '-'):gsub('%-+$', ''))
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue