qmk generate-rules-mk
: add --escape
switch for makefile logic (#12101)
This commit is contained in:
parent
7aa74c227b
commit
6461087c86
2 changed files with 6 additions and 2 deletions
|
@ -36,6 +36,7 @@ def process_mapping_rule(kb_info_json, rules_key, info_dict):
|
|||
|
||||
@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to')
|
||||
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages")
|
||||
@cli.argument('-e', '--escape', arg_only=True, action='store_true', help="Escape spaces in quiet mode")
|
||||
@cli.argument('-kb', '--keyboard', help='Keyboard to generate config.h for.')
|
||||
@cli.subcommand('Used by the make system to generate info_config.h from info.json', hidden=True)
|
||||
@automagic_keyboard
|
||||
|
@ -83,7 +84,10 @@ def generate_rules_mk(cli):
|
|||
cli.args.output.write_text(rules_mk)
|
||||
|
||||
if cli.args.quiet:
|
||||
print(cli.args.output)
|
||||
if cli.args.escape:
|
||||
print(cli.args.output.as_posix().replace(' ', '\\ '))
|
||||
else:
|
||||
print(cli.args.output)
|
||||
else:
|
||||
cli.log.info('Wrote rules.mk to %s.', cli.args.output)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue