diff options
| author | ruki <[email protected]> | 2024-03-27 23:42:48 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-03-27 23:42:48 +0800 |
| commit | 518fc29b6aae6f4db40c7f6b760e269266a41475 (patch) | |
| tree | 26c92de5604ccaeacb944bc6787f40d0ada26b5f | |
| parent | 63915e436cd859c0ef6fe9b281b441d6129b2fbb (diff) | |
format install desc
| -rw-r--r-- | xmake/actions/install/xmake.lua | 48 | ||||
| -rw-r--r-- | xmake/actions/uninstall/xmake.lua | 65 |
2 files changed, 50 insertions, 63 deletions
diff --git a/xmake/actions/install/xmake.lua b/xmake/actions/install/xmake.lua index df48b03a7..dc1f0cdee 100644 --- a/xmake/actions/install/xmake.lua +++ b/xmake/actions/install/xmake.lua @@ -22,30 +22,30 @@ task("install") set_category("action") on_run("main") set_menu { - usage = "xmake install|i [options] [target]" - , description = "Package and install the target binary files." - , shortname = 'i' - , options = - { - {'o', "installdir", "kv", nil , "Set the install directory.", - "e.g.", - " $ xmake install -o /usr/local", - "or $ DESTDIR=/usr/local xmake install", - "or $ INSTALLDIR=/usr/local xmake install" } - , {'g', "group", "kv", nil , "Install all targets of the given group. It support path pattern matching.", - "e.g.", - " xmake install -g test", - " xmake install -g test_*", - " xmake install --group=benchmark/*" } - , {'a', "all", "k", nil , "Install all targets." } - , {nil, "nopkgs", "k", nil , "Only install targets without packages." } - , {nil, "admin", "k", nil , "Try to request administrator permission to install"} - - , { } - , {nil, "target", "v", nil , "The target name. It will install all default targets if this parameter is not specified." - , values = function (complete, opt) return import("private.utils.complete_helper.targets")(complete, opt) end } - } - } + usage = "xmake install|i [options] [target]", + description = "Package and install the target binary files.", + shortname = 'i', + options = { + {'o', "installdir", "kv", nil , "Set the install directory.", + "e.g.", + " $ xmake install -o /usr/local", + "or $ DESTDIR=/usr/local xmake install", + "or $ INSTALLDIR=/usr/local xmake install" }, + {'g', "group", "kv", nil , "Install all targets of the given group. It support path pattern matching.", + "e.g.", + " xmake install -g test", + " xmake install -g test_*", + " xmake install --group=benchmark/*" }, + {'a', "all", "k", nil , "Install all targets." }, + {nil, "nopkgs", "k", nil , "Only install targets without packages." }, + {nil, "admin", "k", nil , "Try to request administrator permission to install"}, + {}, + {nil, "target", "v", nil , "The target name. It will install all default targets if this parameter is not specified.", + values = function (complete, opt) + return import("private.utils.complete_helper.targets")(complete, opt) + end} + } + } diff --git a/xmake/actions/uninstall/xmake.lua b/xmake/actions/uninstall/xmake.lua index 30d87f498..2cb13d85a 100644 --- a/xmake/actions/uninstall/xmake.lua +++ b/xmake/actions/uninstall/xmake.lua @@ -18,49 +18,36 @@ -- @file xmake.lua -- --- define task task("uninstall") - - -- set category set_category("action") - - -- on run on_run("main") - - -- set menu set_menu { - -- usage - usage = "xmake uninstall|u [options] [target]" - - -- description - , description = "Uninstall the project binary files." - - -- xmake u - , shortname = 'u' - - -- options - , options = - { - {nil, "installdir", "kv", nil , "Set the install directory.", - "e.g.", - " $ xmake uninstall -o /usr/local", - "or $ DESTDIR=/usr/local xmake uninstall", - "or $ INSTALLDIR=/usr/local xmake uninstall" } - , {'g', "group", "kv", nil , "Uninstall all targets of the given group. It support path pattern matching.", - "e.g.", - " xmake uninstall -g test", - " xmake uninstall -g test_*", - " xmake uninstall --group=benchmark/*" } - , {'p', "prefix", "kv", nil , "Set the prefix directory.", - "e.g.", - " $ xmake uninstall --prefix=local", - "or $ PREFIX=local xmake uninstall" } - , {nil, "admin", "k", nil , "Try to request administrator permission to uninstall"} - , { } - , {nil, "target", "v", nil , "The target name. It will uninstall all default targets if this parameter is not specified." - , values = function (complete, opt) return import("private.utils.complete_helper.targets")(complete, opt) end } - } - } + usage = "xmake uninstall|u [options] [target]", + description = "Uninstall the project binary files.", + shortname = 'u', + options = { + {nil, "installdir", "kv", nil , "Set the install directory.", + "e.g.", + " $ xmake uninstall -o /usr/local", + "or $ DESTDIR=/usr/local xmake uninstall", + "or $ INSTALLDIR=/usr/local xmake uninstall" }, + {'g', "group", "kv", nil , "Uninstall all targets of the given group. It support path pattern matching.", + "e.g.", + " xmake uninstall -g test", + " xmake uninstall -g test_*", + " xmake uninstall --group=benchmark/*" }, + {'p', "prefix", "kv", nil , "Set the prefix directory.", + "e.g.", + " $ xmake uninstall --prefix=local", + "or $ PREFIX=local xmake uninstall" }, + {nil, "admin", "k", nil , "Try to request administrator permission to uninstall"}, + { }, + {nil, "target", "v", nil , "The target name. It will uninstall all default targets if this parameter is not specified.", + values = function (complete, opt) + return import("private.utils.complete_helper.targets")(complete, opt) + end} + } + } |
