1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 22:39:43 +00:00

allow (dyn)variables in import for #89

This commit is contained in:
deadc0de6
2019-03-05 22:11:05 +01:00
parent 82ac34a520
commit e2feeb09c2
2 changed files with 20 additions and 0 deletions

View File

@@ -424,9 +424,12 @@ class Cfg:
keys = []
if self.key_profiles_imp not in self.lnk_profiles[profile]:
return keys
variables = self.get_variables(profile, debug=self.debug)
t = Templategen(variables=variables)
paths = self.lnk_profiles[profile][self.key_profiles_imp]
for path in paths:
path = self._abs_path(path)
path = t.generate_string(path)
if self.debug:
self.log.dbg('loading dotfiles from {}'.format(path))
content = self._load_yaml(path)