diff --git a/docs/api/scripts/builtin-modules/os.md b/docs/api/scripts/builtin-modules/os.md index 9dae21ba..ef23537e 100644 --- a/docs/api/scripts/builtin-modules/os.md +++ b/docs/api/scripts/builtin-modules/os.md @@ -342,7 +342,7 @@ local outdata, errdata = os.iorunv("echo", {"hello", "xmake!"}, {envs = {PATH=". - Get temporary directory -Consistent with the result of [$(tmpdir)](#var-tmpdir), it is just a direct return to return a variable that can be maintained with subsequent strings. +Consistent with the result of [$(tmpdir)](/api/description/builtin-variables#var-tmpdir), it is just a direct return to return a variable that can be maintained with subsequent strings. ```lua print(path.join(os.tmpdir(), "file.txt")) @@ -364,7 +364,7 @@ Used to get a temporary file path, just a path, the file needs to be created by - Get the current directory path -Consistent with the result of [$(curdir)](#var-curdir), it is just a direct return to return a variable that can be maintained with subsequent strings. +Consistent with the result of [$(curdir)](/api/description/builtin-variables#var-curdir), it is just a direct return to return a variable that can be maintained with subsequent strings. Usage reference: [os.tmpdir](#os-tmpdir). @@ -380,7 +380,7 @@ print(os.filesize("/tmp/a")) - Get the path of the current description script -Consistent with the result of [$(scriptdir)](#var-scriptdir), it is just a direct return to return a variable that can be maintained with subsequent strings. +Consistent with the result of [$(scriptdir)](/api/description/builtin-variables#var-scriptdir), it is just a direct return to return a variable that can be maintained with subsequent strings. Usage reference: [os.tmpdir](#os-tmpdir). @@ -388,7 +388,7 @@ Usage reference: [os.tmpdir](#os-tmpdir). - Get the xmake installation main program script directory -Consistent with the result of [$(programdir)](#var-programdir), it is just a direct get returned to a variable, which can be maintained with subsequent strings. +Consistent with the result of [$(programdir)](/api/description/builtin-variables#var-programdir), it is just a direct get returned to a variable, which can be maintained with subsequent strings. ## os.programfile @@ -398,7 +398,7 @@ Consistent with the result of [$(programdir)](#var-programdir), it is just a dir - Get the project home directory -Consistent with the result of [$(projectdir)](#var-projectdir), it is just a direct return to return a variable that can be maintained with subsequent strings. +Consistent with the result of [$(projectdir)](/api/description/builtin-variables#var-projectdir), it is just a direct return to return a variable that can be maintained with subsequent strings. ## os.arch @@ -410,7 +410,7 @@ That is the default architecture of the current host system, for example, I exec - Get the operating system of the current host -Consistent with the result of [$(host)](#var-host), for example, if I execute xmake on `linux x86_64` to build, the return value is: `linux` +Consistent with the result of [$(host)](/api/description/builtin-variables#var-host), for example, if I execute xmake on `linux x86_64` to build, the return value is: `linux` ## os.subhost diff --git a/docs/zh/api/scripts/builtin-modules/os.md b/docs/zh/api/scripts/builtin-modules/os.md index ec852ea4..23a92120 100644 --- a/docs/zh/api/scripts/builtin-modules/os.md +++ b/docs/zh/api/scripts/builtin-modules/os.md @@ -352,7 +352,7 @@ os.setenv("HOME", "/tmp/") - 获取临时目录 -跟[$(tmpdir)](#var-tmpdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 +跟[$(tmpdir)](/zh/api/description/builtin-variables#var-tmpdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 ```lua print(path.join(os.tmpdir(), "file.txt")) @@ -374,7 +374,7 @@ print("$(tmpdir)/file.txt") - 获取当前目录路径 -跟[$(curdir)](#var-curdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 +跟[$(curdir)](/zh/api/description/builtin-variables#var-curdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 用法参考:[os.tmpdir](#os-tmpdir)。 @@ -390,7 +390,7 @@ print(os.filesize("/tmp/a")) - 获取当前描述脚本的路径 -跟[$(scriptdir)](#var-scriptdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 +跟[$(scriptdir)](/zh/api/description/builtin-variables#var-scriptdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 用法参考:[os.tmpdir](#os-tmpdir)。 @@ -398,7 +398,7 @@ print(os.filesize("/tmp/a")) - 获取xmake安装主程序脚本目录 -跟[$(programdir)](#var-programdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 +跟[$(programdir)](/zh/api/description/builtin-variables#var-programdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 ## os.programfile @@ -408,7 +408,7 @@ print(os.filesize("/tmp/a")) - 获取工程主目录 -跟[$(projectdir)](#var-projectdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 +跟[$(projectdir)](/zh/api/description/builtin-variables#var-projectdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 ## os.arch @@ -420,7 +420,7 @@ print(os.filesize("/tmp/a")) - 获取当前主机的操作系统 -跟[$(host)](#var-host)结果一致,例如我在`linux x86_64`上执行xmake进行构建,那么返回值是:`linux` +跟[$(host)](/zh/api/description/builtin-variables#var-host)结果一致,例如我在`linux x86_64`上执行xmake进行构建,那么返回值是:`linux` ## os.subhost