diff options
| author | ruki <[email protected]> | 2015-06-04 14:08:40 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-04 14:08:40 +0800 |
| commit | 1481ec887abef9ce33f4cff93f7a0e6ab04b5741 (patch) | |
| tree | 609560fefb90242fb8deabd525201e00cd078b12 /xmake/scripts/tools/echo.lua | |
| parent | 2f468e35a6c681a22308d1c6d1d37764c386c00c (diff) | |
modify some tool interfaces
Diffstat (limited to 'xmake/scripts/tools/echo.lua')
| -rw-r--r-- | xmake/scripts/tools/echo.lua | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/xmake/scripts/tools/echo.lua b/xmake/scripts/tools/echo.lua index 2180ce0d4..197cebedc 100644 --- a/xmake/scripts/tools/echo.lua +++ b/xmake/scripts/tools/echo.lua @@ -20,11 +20,25 @@ -- @file echo.lua -- --- echo all -for _, v in ipairs(...) do - io.write(string.format("%s ", v:gsub("%%20", " "))) +-- define module: echo +local echo = echo or {} + +-- load modules +local io = require("base/io") +local string = require("base/string") + +-- the main function +function echo.main(...) + + -- echo all + for _, v in ipairs(...) do + io.write(string.format("%s ", v:gsub("%%20", " "))) + end + io.write("\n") + + -- ok + return true end -io.write("\n") --- ok -return true +-- return module: echo +return echo |
