diff options
| author | ruki <[email protected]> | 2023-04-27 00:35:40 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-04-27 00:35:40 +0800 |
| commit | 80957b2d5737b26bd2f0d94418357f12a7ff8ae5 (patch) | |
| tree | c6360b363a8d0af64ac79afc13be4f9021d9e04f /xmake/plugins/project/make/makefile.lua | |
| parent | 35891f39a780ec8d1d580876c87786b7d884a116 (diff) | |
improve cd cmd
Diffstat (limited to 'xmake/plugins/project/make/makefile.lua')
| -rw-r--r-- | xmake/plugins/project/make/makefile.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/plugins/project/make/makefile.lua b/xmake/plugins/project/make/makefile.lua index 5fce2e92f..cdfd1cf8d 100644 --- a/xmake/plugins/project/make/makefile.lua +++ b/xmake/plugins/project/make/makefile.lua @@ -210,6 +210,11 @@ function _get_cmd_echo(str) return string.format("@echo %s", colors.ignore(str)) end +-- get command: cd +function _get_cmd_cd(dir) + return string.format("@cd %s", dir) +end + -- get command string function _get_command_string(cmd, outputdir) local kind = cmd.kind @@ -236,7 +241,7 @@ function _get_command_string(cmd, outputdir) elseif kind == "mv" then return _get_cmd_mv(_get_relative_unix_path(cmd.srcpath, outputdir), _get_relative_unix_path(cmd.dstpath, outputdir)) elseif kind == "cd" then - return string.format("cd %s", _get_relative_unix_path(cmd.dir, outputdir)) + return _get_cmd_cd(_get_relative_unix_path(cmd.dir, outputdir)) elseif kind == "mkdir" then return _get_cmd_mkdir(_get_relative_unix_path(cmd.dir, outputdir)) elseif kind == "show" then |
