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

refactor installer

This commit is contained in:
deadc0de6
2020-11-17 13:42:53 +01:00
parent 89d6a1b6ed
commit e4d2d272a8
8 changed files with 132 additions and 217 deletions

View File

@@ -115,7 +115,8 @@ class Dotfile(DictParser):
msg += ', dst:\"{}\"'.format(self.dst)
msg += ', link:\"{}\"'.format(str(self.link))
msg += ', template:{}'.format(self.template)
msg += ', chmod:{}'.format(self.chmod)
if self.chmod:
msg += ', chmod:{:o}'.format(self.chmod)
return msg
def prt(self):
@@ -126,7 +127,8 @@ class Dotfile(DictParser):
out += '\n{}dst: \"{}\"'.format(indent, self.dst)
out += '\n{}link: \"{}\"'.format(indent, str(self.link))
out += '\n{}template: \"{}\"'.format(indent, str(self.template))
out += '\n{}chmod: \"{}\"'.format(indent, str(self.chmod))
if self.chmod:
out += '\n{}chmod: \"{:o}\"'.format(indent, self.chmod)
out += '\n{}pre-action:'.format(indent)
some = self.get_pre_actions()