summaryrefslogtreecommitdiff
path: root/dotbot/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'dotbot/cli.py')
-rw-r--r--dotbot/cli.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/dotbot/cli.py b/dotbot/cli.py
index 77bd439..258ea87 100644
--- a/dotbot/cli.py
+++ b/dotbot/cli.py
@@ -28,6 +28,10 @@ def add_options(parser):
action='store_true', help='disable built-in plugins')
parser.add_argument('--plugin-dir', action='append', dest='plugin_dirs', default=[],
metavar='PLUGIN_DIR', help='load all plugins in PLUGIN_DIR')
+ parser.add_argument('--only', nargs='+',
+ help='only run specified directives', metavar='DIRECTIVE')
+ parser.add_argument('--except', nargs='+', dest='skip',
+ help='skip specified directives', metavar='DIRECTIVE')
parser.add_argument('--no-color', dest='no_color', action='store_true',
help='disable color output')
parser.add_argument('--version', action='store_true',
@@ -78,7 +82,7 @@ def main():
# default to directory of config file
base_directory = os.path.dirname(os.path.abspath(options.config_file))
os.chdir(base_directory)
- dispatcher = Dispatcher(base_directory)
+ dispatcher = Dispatcher(base_directory, only=options.only, skip=options.skip)
success = dispatcher.dispatch(tasks)
if success:
log.info('\n==> All tasks executed successfully')