1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-08 05:39:15 +00:00

add ability to compare with patterns in dotfile (#57)

This commit is contained in:
deadc0de6
2018-09-19 09:40:17 +02:00
parent c8ee2f7be1
commit ce53fb4339
7 changed files with 99 additions and 25 deletions

View File

@@ -9,7 +9,8 @@ represents a dotfile in dotdrop
class Dotfile:
def __init__(self, key, dst, src,
actions={}, trans=[], link=False):
actions={}, trans=[],
link=False, cmpignore=[]):
# key of dotfile in the config
self.key = key
# path where to install this dotfile
@@ -22,6 +23,8 @@ class Dotfile:
self.actions = actions
# list of transformations
self.trans = trans
# pattern to ignore when comparing
self.cmpignore = cmpignore
def __str__(self):
msg = 'key:\"{}\", src:\"{}\", dst:\"{}\", link:\"{}\"'