mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-15 11:40:06 +00:00
Save LinkType enum in opts
This commit is contained in:
@@ -262,13 +262,9 @@ def cmd_importer(opts, conf, paths):
|
|||||||
# create a new dotfile
|
# create a new dotfile
|
||||||
dotfile = Dotfile('', dst, src)
|
dotfile = Dotfile('', dst, src)
|
||||||
|
|
||||||
linktype = LinkTypes.NOLINK
|
linktype = LinkTypes(opts['link'])
|
||||||
if opts['link_by_default']:
|
|
||||||
linktype = LinkTypes.PARENTS
|
|
||||||
elif opts['link_children']:
|
|
||||||
linktype = LinkTypes.CHILDREN
|
|
||||||
|
|
||||||
if opts['link'] and linktype == LinkTypes.PARENTS:
|
if opts['link_by_default'] and linktype == LinkTypes.PARENTS:
|
||||||
linktype = LinkTypes.NOLINK
|
linktype = LinkTypes.NOLINK
|
||||||
else:
|
else:
|
||||||
linktype = LinkTypes.PARENTS
|
linktype = LinkTypes.PARENTS
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import tempfile
|
|||||||
|
|
||||||
from dotdrop.config import Cfg
|
from dotdrop.config import Cfg
|
||||||
from dotdrop.utils import *
|
from dotdrop.utils import *
|
||||||
|
from dotdrop.linktypes import LinkTypes
|
||||||
|
|
||||||
TMPSUFFIX = '.dotdrop'
|
TMPSUFFIX = '.dotdrop'
|
||||||
|
|
||||||
@@ -87,8 +88,7 @@ def load_config(confpath, profile):
|
|||||||
opts['profile'] = profile
|
opts['profile'] = profile
|
||||||
opts['safe'] = True
|
opts['safe'] = True
|
||||||
opts['installdiff'] = True
|
opts['installdiff'] = True
|
||||||
opts['link'] = False
|
opts['link'] = LinkTypes.NOLINK.value
|
||||||
opts['link_children'] = False
|
|
||||||
opts['showdiff'] = True
|
opts['showdiff'] = True
|
||||||
opts['debug'] = True
|
opts['debug'] = True
|
||||||
opts['dopts'] = ''
|
opts['dopts'] = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user