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/mkdir.lua | |
| parent | 2f468e35a6c681a22308d1c6d1d37764c386c00c (diff) | |
modify some tool interfaces
Diffstat (limited to 'xmake/scripts/tools/mkdir.lua')
| -rw-r--r-- | xmake/scripts/tools/mkdir.lua | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/xmake/scripts/tools/mkdir.lua b/xmake/scripts/tools/mkdir.lua index 0cd1eeafe..4b5ac1a7f 100644 --- a/xmake/scripts/tools/mkdir.lua +++ b/xmake/scripts/tools/mkdir.lua @@ -20,14 +20,27 @@ -- @file mkdir.lua -- --- mkdir all -for _, dir in ipairs(...) do - if not os.exists(dir) then - if not os.mkdir(dir) then - return false +-- define module: mkdir +local mkdir = mkdir or {} + +-- load modules +local os = require("base/os") + +-- the main function +function mkdir.main(...) + + -- mkdir all + for _, dir in ipairs(...) do + if not os.exists(dir) then + if not os.mkdir(dir) then + return false + end end end + + -- ok + return true end --- ok -return true +-- return module: mkdir +return mkdir |
