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