newaction - premake/premake-4.x GitHub Wiki
Home > [Scripting Reference](Scripting Reference) > newaction
newaction
The newaction function registers a new command-line action argument. For more information, see [Command Line Arguments](Command Line Arguments).
#!lua
newaction (description)
Parameters
description is a table describing the new action. It may contain the following fields:
| trigger | The string identifier of the action; what the user would type on the command line. |
| description | A short description of the action, to be displayed in the help text. |
| execute | A function to be executed when the action is fired. |
See Also
[Command Line Arguments](Command Line Arguments)
Examples
Register a new action to install the software project.
#!lua
newaction {
trigger = "install",
description = "Install the software",
execute = function ()
os.copyfile("bin/debug/myprogram", "/usr/local/bin/myprogram")
end
}