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