diff options
author | Ben Klein <robobenklein@gmail.com> | 2018-01-27 04:11:11 -0500 |
---|---|---|
committer | Anish Athalye <me@anishathalye.com> | 2018-04-13 08:49:02 -0400 |
commit | 564d16fcd55f17e71012fd79bec39f2846fe484f (patch) | |
tree | 3ed568cadd7be81c2eabe946c920c63c0d0cf06a | |
parent | dece710399e305a2d94a0786e71c56dcdba14430 (diff) |
Allow force and relink on glob items
-rw-r--r-- | plugins/link.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/link.py b/plugins/link.py index b77b956..d0f057e 100644 --- a/plugins/link.py +++ b/plugins/link.py @@ -63,13 +63,15 @@ class Link(dotbot.Plugin): success &= self._delete(path, destination, relative, force) success &= self._link(path, destination, relative) else: - self._log.lowinfo("Linking globbed items: " + str(glob_results)) + self._log.lowinfo("Globs from '" + path + "': " + str(glob_results)) glob_base = path[:glob_star_loc] for glob_full_item in glob_results: glob_item = glob_full_item[len(glob_base):] glob_link_destination = destination + glob_item if create: success &= self._create(glob_link_destination) + if force or relink: + success &= self._delete(glob_full_item, glob_link_destination, relative, force) success &= self._link(glob_full_item, glob_link_destination, relative) else: if create: |