Add libexec support and migrate cdist-dump
This commit is contained in:
parent
9859080217
commit
7dddcb794b
7 changed files with 63 additions and 12 deletions
|
|
@ -30,14 +30,20 @@ import cdist.config
|
|||
import cdist.install
|
||||
import cdist.shell
|
||||
import cdist.inventory
|
||||
import cdist.libexec as libexec
|
||||
|
||||
|
||||
def commandline():
|
||||
"""Parse command line"""
|
||||
|
||||
# preos subcommand hack
|
||||
if len(sys.argv) > 1 and sys.argv[1] == 'preos':
|
||||
return cdist.preos.PreOS.commandline(sys.argv[1:])
|
||||
if len(sys.argv) > 1:
|
||||
# preos subcommand hack
|
||||
if sys.argv[1] == 'preos':
|
||||
return cdist.preos.PreOS.commandline(sys.argv[1:])
|
||||
# libexec subcommands hack
|
||||
if libexec.is_libexec_command(sys.argv[1]):
|
||||
return libexec.run(sys.argv[1], sys.argv[2:])
|
||||
|
||||
parser, cfg = cdist.argparse.parse_and_configure(sys.argv[1:])
|
||||
args = cfg.get_args()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue