When developing the Omnitrix module, you must create multiple directories as required by the system.
It is really boring to repeat such a series of operations every time. Recently, ant can be used for simple implementation.
Copy the following content to the build. xml file:
<? XML version = "1.0" encoding = "UTF-8"?> <Project name = "Omnitrix" Default = "Omnitrix" basedir = ". "> <property name =" root "location = ". "/> <target name =" Create-module "> <fail message =" Usage: ant create-module-dmodule_name = foo "> <condition> <not> < Isset Property = "module_name"/> </not> </condition> </fail> < Mkdir Dir = "$ {Root}/modules/$ {module_name}"/> <Mkdir Dir = "$ {Root}/modules/$ {module_name}/controllers"/> < Mkdir Dir = "$ {Root}/modules/$ {module_name}/templates"/> < Mkdir Dir = "$ {Root}/modules/$ {module_name}/ages"/> < Mkdir Dir = "$ {Root}/modules/$ {module_name}/ages/Chinese"/> </Target> </Project>
Execute the following command on the command line to perform the following operations:
Ant create-module-dmodule_name = foo
When the command parameter is not specified, ant can prompt us to use the correct method and terminate the execution.