summaryrefslogtreecommitdiff
path: root/xmake/core/base/linuxos.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/base/linuxos.lua')
-rw-r--r--xmake/core/base/linuxos.lua21
1 files changed, 10 insertions, 11 deletions
diff --git a/xmake/core/base/linuxos.lua b/xmake/core/base/linuxos.lua
index d9e018a36..32af1ccad 100644
--- a/xmake/core/base/linuxos.lua
+++ b/xmake/core/base/linuxos.lua
@@ -66,17 +66,10 @@ function linuxos._uname_r()
return uname_r or nil
end
--- get system name
+-- get linux distribution name
+--
+-- @return the distribution name string, e.g. "ubuntu", "debian", "archlinux", "fedora"
--
--- e.g.
--- - ubuntu
--- - debian
--- - archlinux
--- - rhel
--- - centos
--- - fedora
--- - opensuse
--- - ...
function linuxos.name()
local name = linuxos._NAME
if name == nil then
@@ -138,7 +131,10 @@ function linuxos.name()
return name
end
--- get system version
+-- get linux distribution version
+--
+-- @return the semver version object
+--
function linuxos.version()
local version = linuxos._VERSION
if version == nil then
@@ -198,6 +194,9 @@ function linuxos.version()
end
-- get linux kernel version
+--
+-- @return the semver version object
+--
function linuxos.kernelver()
local version = linuxos._KERNELVER
if version == nil then