summaryrefslogtreecommitdiff
path: root/xmake/scripts/tools/cp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/tools/cp.lua')
-rw-r--r--xmake/scripts/tools/cp.lua26
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