diff options
| author | ruki <[email protected]> | 2023-06-11 23:47:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-06-11 23:47:26 +0800 |
| commit | 01807b861740f0db0398fe4928a6b322164d1c26 (patch) | |
| tree | 7406d024772871503a38da9467d3eac76a0776b4 | |
| parent | 9c642180feb949d477cd9dc316307ce1463607a9 (diff) | |
format code style
| -rw-r--r-- | xmake/modules/detect/tools/find_rpm.lua | 8 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_zypper.lua | 10 | ||||
| -rw-r--r-- | xmake/modules/package/manager/zypper/find_package.lua | 8 |
3 files changed, 2 insertions, 24 deletions
diff --git a/xmake/modules/detect/tools/find_rpm.lua b/xmake/modules/detect/tools/find_rpm.lua index 02c59b5e3..fc04f1d0d 100644 --- a/xmake/modules/detect/tools/find_rpm.lua +++ b/xmake/modules/detect/tools/find_rpm.lua @@ -36,19 +36,11 @@ import("lib.detect.find_programver") -- @endcode -- function main(opt) - - -- init options opt = opt or {} - - -- find program local program = find_program(opt.program or "rpm", opt) - - -- find program version local version = nil if program and opt and opt.version then version = find_programver(program, opt) end - - -- ok? return program, version end diff --git a/xmake/modules/detect/tools/find_zypper.lua b/xmake/modules/detect/tools/find_zypper.lua index cc0fb0445..02c96dec3 100644 --- a/xmake/modules/detect/tools/find_zypper.lua +++ b/xmake/modules/detect/tools/find_zypper.lua @@ -36,19 +36,11 @@ import("lib.detect.find_programver") -- @endcode -- function main(opt) - - -- init options opt = opt or {} - - -- find program local program = find_program(opt.program or "zypper", opt) - - -- find program version local version = nil if program and opt and opt.version then version = find_programver(program, opt) end - - -- ok? return program, version -end
\ No newline at end of file +end diff --git a/xmake/modules/package/manager/zypper/find_package.lua b/xmake/modules/package/manager/zypper/find_package.lua index 20e14b137..1840de5c2 100644 --- a/xmake/modules/package/manager/zypper/find_package.lua +++ b/xmake/modules/package/manager/zypper/find_package.lua @@ -88,7 +88,7 @@ function _find_package(rpm, name, opt) foundpc = true end end - if foundpc == true then + if foundpc then pcresult.includedirs = table.unique(pcresult.includedirs) pcresult.linkdirs = table.unique(pcresult.linkdirs) pcresult.links = table.reverse_unique(pcresult.links) @@ -136,19 +136,13 @@ end -- @param opt the options, e.g. {verbose = true, version = "1.12.0") -- function main(name, opt) - - -- check opt = opt or {} if not is_host(opt.plat) or os.arch() ~= opt.arch then return end - - -- find rpm local rpm = find_tool("rpm") if not rpm then return end - - -- find package return _find_package(rpm, name, opt) end |
