mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 16:49:42 +00:00
Invert link with --link flag (#80)
This commit is contained in:
@@ -263,11 +263,16 @@ def cmd_importer(opts, conf, paths):
|
||||
dotfile = Dotfile('', dst, src)
|
||||
|
||||
linktype = LinkTypes.NOLINK
|
||||
if opts['link'] or opts['link_by_default']:
|
||||
if opts['link_by_default']:
|
||||
linktype = LinkTypes.PARENTS
|
||||
elif opts['link_children']:
|
||||
linktype = LinkTypes.CHILDREN
|
||||
|
||||
if opts['link'] and linktype == LinkTypes.PARENTS:
|
||||
linktype = LinkTypes.NOLINK
|
||||
else:
|
||||
linktype = LinkTypes.PARENTS
|
||||
|
||||
if opts['debug']:
|
||||
LOG.dbg('new dotfile: {}'.format(dotfile))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user