1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-09 09:29:17 +00:00

refactor linkall to link_children

This commit is contained in:
deadc0de6
2019-03-13 08:31:39 +01:00
parent c55b58f63b
commit bf23f6b341
3 changed files with 22 additions and 20 deletions

View File

@@ -63,7 +63,8 @@ def cmd_install(o):
if hasattr(dotfile, 'link') and dotfile.link == LinkTypes.PARENTS:
r = inst.link(t, dotfile.src, dotfile.dst, actions=preactions)
elif hasattr(dotfile, 'link') and dotfile.link == LinkTypes.CHILDREN:
r = inst.linkall(t, dotfile.src, dotfile.dst, actions=preactions)
r = inst.link_children(t, dotfile.src, dotfile.dst,
actions=preactions)
else:
src = dotfile.src
tmp = None

View File

@@ -101,10 +101,10 @@ class Installer:
src = tmp
return self._link(src, dst, actions=actions)
def linkall(self, templater, src, dst, actions=[]):
def link_children(self, templater, src, dst, actions=[]):
"""link all dotfiles in a given directory"""
if self.debug:
self.log.dbg('linkall {} to {}'.format(src, dst))
self.log.dbg('link_children {} to {}'.format(src, dst))
self.action_executed = False
parent = os.path.join(self.base, os.path.expanduser(src))