diff options
| author | ruki <[email protected]> | 2016-05-30 09:26:28 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-05-30 09:26:28 +0800 |
| commit | 2258b6be79c6b07a197ca27f79c89baaf8fd3779 (patch) | |
| tree | 520f3392b90b66c3a6f67d2c41b636f56fa3477e | |
| parent | 23acb023758b0b47cb5083d0d800fc48fc96d920 (diff) | |
impl uninstall package action
| -rwxr-xr-x | xmake/actions/uninstall/main.lua | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/xmake/actions/uninstall/main.lua b/xmake/actions/uninstall/main.lua index fb0101efa..e1c3192d5 100755 --- a/xmake/actions/uninstall/main.lua +++ b/xmake/actions/uninstall/main.lua @@ -28,15 +28,11 @@ import("core.project.global") import("core.project.project") import("core.platform.platform") --- uninstall binary -function _uninstall_binary(target) - -end - --- uninstall library -function _uninstall_library(target) - +-- uninstall package +function _uninstall_package(target) + -- remove the package + os.rm(format("$(packagedir)/%s.pkg", target:name())) end -- uninstall target @@ -48,9 +44,9 @@ function _uninstall_target(target) -- get script local scripts = { - binary = _uninstall_binary - , static = _uninstall_library - , shared = _uninstall_library + binary = _uninstall_package + , static = _uninstall_package + , shared = _uninstall_package } -- check @@ -115,8 +111,8 @@ function main() -- init finished states _g.finished = {} - -- build it first - task.run("build", {target = targetname}) + -- config it first + task.run("config", {target = targetname}) -- uninstall all? if targetname == "all" then |
