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

Add support for importing dotfiles as links

This commit is contained in:
moyiz
2017-05-05 17:02:18 +03:00
parent 6a178d746d
commit 05b78ca5fe
2 changed files with 14 additions and 6 deletions

View File

@@ -87,7 +87,7 @@ class Cfg:
return absconf
return dotpath
def new(self, dotfile, profile):
def new(self, dotfile, profile, link=False):
""" import new dotfile """
dots = self.content[self.key_dotfiles]
if dots is None:
@@ -103,6 +103,8 @@ class Cfg:
self.key_dotfiles_dst: dotfile.dst,
self.key_dotfiles_src: dotfile.src
}
if link:
dots[dotfile.key][self.key_dotfiles_link] = True
profiles = self.profiles
if profile in profiles and profiles[profile] != [self.key_all]:
if self.content[self.key_profiles][profile] is None: