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

update doc and tests for link

This commit is contained in:
deadc0de6
2022-05-31 18:24:30 +02:00
committed by deadc0de
parent cda6d08f5f
commit fa1be9d29c
16 changed files with 41 additions and 40 deletions

View File

@@ -224,7 +224,7 @@ def _dotfile_install(opts, dotfile, tmpdir=None):
LinkTypes.LINK, LinkTypes.LINK_CHILDREN,
LinkTypes.RELATIVE, LinkTypes.ABSOLUTE
):
# link|relative|absolute|link_children
# nolink|relative|absolute|link_children
ret, err = inst.install(templ, dotfile.src, dotfile.dst,
dotfile.link,
actionexec=pre_actions_exec,
@@ -645,7 +645,7 @@ def cmd_remove(opts):
k = dotfile.key
# ignore if uses any type of link
if dotfile.link != LinkTypes.NOLINK:
msg = '{} uses link/link_children, remove manually'
msg = '{} uses symlink, remove manually'
LOG.warn(msg.format(k))
continue

View File

@@ -43,7 +43,8 @@ ETCCFG = '/etc/{}'.format(NAME)
OPT_LINK = {
LinkTypes.NOLINK.name.lower(): LinkTypes.NOLINK,
LinkTypes.LINK.name.lower(): LinkTypes.LINK,
LinkTypes.ABSOLUTE.name.lower(): LinkTypes.ABSOLUTE,
LinkTypes.RELATIVE.name.lower(): LinkTypes.RELATIVE,
LinkTypes.LINK_CHILDREN.name.lower(): LinkTypes.LINK_CHILDREN}
BANNER = r""" _ _ _
@@ -82,7 +83,7 @@ Options:
-G --grepable Grepable output.
-i --ignore=<pattern> Pattern to ignore.
-k --key Treat <path> as a dotfile key.
-l --link=<link> Link option (nolink|link|link_children).
-l --link=<link> Link option (nolink|absolute|relative|link_children).
-L --file-only Do not show diff but only the files that differ.
-m --preserve-mode Insert a chmod entry in the dotfile with its mode.
-n --nodiff Do not diff when installing.