1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-05 03:19:43 +00:00

add -w --workers cli switch

This commit is contained in:
deadc0de6
2020-11-08 14:13:06 +01:00
parent e3c9a486d9
commit a766874653
2 changed files with 4 additions and 3 deletions

View File

@@ -54,7 +54,7 @@ USAGE = """
Usage:
dotdrop install [-VbtfndDa] [-c <path>] [-p <profile>] [<key>...]
dotdrop import [-Vbdf] [-c <path>] [-p <profile>] [-s <path>]
[-l <link>] <path>...
[-w <nb>] [-l <link>] <path>...
dotdrop compare [-LVb] [-c <path>] [-p <profile>]
[-C <file>...] [-i <pattern>...]
dotdrop update [-VbfdkP] [-c <path>] [-p <profile>]
@@ -86,6 +86,7 @@ Options:
-t --temp Install to a temporary directory for review.
-T --template Only template dotfiles.
-V --verbose Be verbose.
-w --workers=<nb> Number of concurrent workers [default: 1].
-v --version Show version.
-h --help Show this screen.
""".format(BANNER, PROFILE)
@@ -237,8 +238,7 @@ class Options(AttrMonitor):
self.install_default_actions_post = [a for a in self.default_actions
if a.kind == Action.post]
self.install_ignore = self.instignore
# TODO add as option
self.install_parallel = True
self.install_parallel = int(self.args['--workers'])
# "compare" specifics
self.compare_focus = self.args['--file']
self.compare_ignore = self.args['--ignore']

View File

@@ -131,6 +131,7 @@ def _fake_args():
args['--grepable'] = False
args['--as'] = None
args['--file-only'] = False
args['--workers'] = 1
# cmds
args['profiles'] = False
args['files'] = False