1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-07 06:30:50 +00:00

add ability to not deploy empty template

This commit is contained in:
deadc0de6
2018-11-15 19:34:49 +01:00
parent 0d407337ea
commit 1543762a5b
7 changed files with 187 additions and 19 deletions

View File

@@ -10,7 +10,8 @@ class Dotfile:
def __init__(self, key, dst, src,
actions={}, trans=[],
link=False, cmpignore=[]):
link=False, cmpignore=[],
noempty=False):
# key of dotfile in the config
self.key = key
# path where to install this dotfile
@@ -25,6 +26,8 @@ class Dotfile:
self.trans = trans
# pattern to ignore when comparing
self.cmpignore = cmpignore
# do not deploy empty file
self.noempty = noempty
def __str__(self):
msg = 'key:\"{}\", src:\"{}\", dst:\"{}\", link:\"{}\"'