Convert info_json_gz.h generation to CLI

This commit is contained in:
zvecr 2022-03-15 17:59:12 +00:00
parent b96b862ef9
commit 2b4724bd83
4 changed files with 82 additions and 14 deletions

View file

@ -6,19 +6,13 @@ from subprocess import DEVNULL
from milc import cli
from qmk.path import normpath
def _get_chunks(it, size):
"""Break down a collection into smaller parts
"""
it = iter(it)
return iter(lambda: tuple(islice(it, size)), ())
from qmk.commands import get_chunks
def dos2unix_run(files):
"""Spawn multiple dos2unix subprocess avoiding too long commands on formatting everything
"""
for chunk in _get_chunks(files, 10):
for chunk in get_chunks(files, 10):
dos2unix = cli.run(['dos2unix', *chunk])
if dos2unix.returncode: