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/cp.lua | |
| parent | 2f468e35a6c681a22308d1c6d1d37764c386c00c (diff) | |
modify some tool interfaces
Diffstat (limited to 'xmake/scripts/tools/cp.lua')
| -rw-r--r-- | xmake/scripts/tools/cp.lua | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/xmake/scripts/tools/cp.lua b/xmake/scripts/tools/cp.lua index 344e3e1dd..4d400a19b 100644 --- a/xmake/scripts/tools/cp.lua +++ b/xmake/scripts/tools/cp.lua @@ -20,11 +20,25 @@ -- @file cp.lua -- --- cp it -local pathes = ... -if pathes and table.getn(pathes) == 2 then - return os.cp(pathes[1], pathes[2]) +-- define module: cp +local cp = cp or {} + +-- load modules +local os = require("base/os") + +-- the main function +function cp.main(...) + + -- cp it + local pathes = ... + if pathes and table.getn(pathes) == 2 then + return os.cp(pathes[1], pathes[2]) + end + + -- failed + return false + end --- failed -return false +-- return module: cp +return cp |
