mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 22:04:44 +00:00
uninstall skeleton
This commit is contained in:
@@ -620,6 +620,17 @@ def cmd_detail(opts):
|
||||
LOG.log('')
|
||||
|
||||
|
||||
def cmd_uninstall(opts):
|
||||
paths = opts.uninstall_path
|
||||
iskey = opts.uninstall_iskey
|
||||
prof = opts.conf.get_profile()
|
||||
|
||||
if not paths:
|
||||
# is entire profile
|
||||
# TODO
|
||||
# TODO
|
||||
|
||||
|
||||
def cmd_remove(opts):
|
||||
"""remove dotfile from dotpath and from config"""
|
||||
paths = opts.remove_path
|
||||
@@ -856,6 +867,12 @@ def _exec_command(opts):
|
||||
LOG.dbg(f'running cmd: {command}')
|
||||
cmd_remove(opts)
|
||||
|
||||
elif opts.cmd_uninstall:
|
||||
# uninstall dotfile
|
||||
command = 'uninstall'
|
||||
LOG.dbg(f'running cmd: {command}')
|
||||
cmd_uninstall(opts)
|
||||
|
||||
except UndefinedException as exc:
|
||||
LOG.err(exc)
|
||||
ret = False
|
||||
|
||||
@@ -68,6 +68,7 @@ Usage:
|
||||
dotdrop update [-VbfdkPz] [-c <path>] [-p <profile>]
|
||||
[-w <nb>] [-i <pattern>...] [<path>...]
|
||||
dotdrop remove [-Vbfdk] [-c <path>] [-p <profile>] [<path>...]
|
||||
dotdrop uninstall [-Vbfdk] [-c <path>] [-p <profile>] [<path>...]
|
||||
dotdrop files [-VbTG] [-c <path>] [-p <profile>]
|
||||
dotdrop detail [-Vb] [-c <path>] [-p <profile>] [<key>...]
|
||||
dotdrop profiles [-VbG] [-c <path>]
|
||||
@@ -340,6 +341,11 @@ class Options(AttrMonitor):
|
||||
self.remove_path = self.args['<path>']
|
||||
self.remove_iskey = self.args['--key']
|
||||
|
||||
def _apply_args_uninstall(self):
|
||||
"""uninstall specifics"""
|
||||
self.uninstall_path = self.args['<path>']
|
||||
self.uninstall_iskey = self.args['--key']
|
||||
|
||||
def _apply_args_detail(self):
|
||||
"""detail specifics"""
|
||||
self.detail_keys = self.args['<key>']
|
||||
@@ -403,6 +409,9 @@ class Options(AttrMonitor):
|
||||
# "remove" specifics
|
||||
self._apply_args_remove()
|
||||
|
||||
# "uninstall" specifics
|
||||
self._apply_args_uninstall()
|
||||
|
||||
def _fill_attr(self):
|
||||
"""create attributes from conf"""
|
||||
# defined variables
|
||||
|
||||
Reference in New Issue
Block a user