1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-07 05:55:47 +00:00

adding relative symlink for #348

This commit is contained in:
deadc0de6
2022-05-28 23:31:20 +02:00
committed by deadc0de
parent 6a2b77ecf1
commit a547f0f72b
5 changed files with 191 additions and 28 deletions

View File

@@ -220,8 +220,11 @@ def _dotfile_install(opts, dotfile, tmpdir=None):
dotfile.src,
ignore=ignores,
)
if hasattr(dotfile, 'link') and dotfile.link == LinkTypes.LINK:
# link
if hasattr(dotfile, 'link') and dotfile.link in (
LinkTypes.LINK, LinkTypes.LINK_CHILDREN,
LinkTypes.RELATIVE, LinkTypes.ABSOLUTE
):
# link|relative|absolute|link_children
ret, err = inst.install(templ, dotfile.src, dotfile.dst,
dotfile.link,
actionexec=pre_actions_exec,
@@ -229,16 +232,6 @@ def _dotfile_install(opts, dotfile, tmpdir=None):
ignore=ignores,
chmod=dotfile.chmod,
force_chmod=opts.install_force_chmod)
elif hasattr(dotfile, 'link') and \
dotfile.link == LinkTypes.LINK_CHILDREN:
# link_children
ret, err = inst.install(templ, dotfile.src, dotfile.dst,
dotfile.link,
actionexec=pre_actions_exec,
is_template=is_template,
chmod=dotfile.chmod,
ignore=ignores,
force_chmod=opts.install_force_chmod)
else:
# nolink
src = dotfile.src