Skip to content
Permalink
Browse files
switch directive to :readonly: for clarity
  • Loading branch information
gstein committed Mar 25, 2021
1 parent e177f0d commit a554f3677c037fc150698fa168eeeeaafe2e561c
Showing 1 changed file with 5 additions and 5 deletions.
10 gen.py
@@ -123,15 +123,15 @@ def write_file(self, template, output):

new_z = [ ]
for line in lines:
if line.startswith(':block:'):
if line.startswith(':readonly:'):
# FORMAT:
# :block:/some/random/path
# :block:/root/path/(alt1|alt2|alt3)
# :readonly:/some/random/path
# :readonly:/root/path/(alt1|alt2|alt3)
if '(' in line:
root, rest = line[7:].split('(')
root, rest = line[10:].split('(')
subdirs = [ root+p for p in rest[:-1].split('|') ]
else:
subdirs = [ line[7:] ]
subdirs = [ line[10:] ]
for s in subdirs:
new_z.append(f'[{s}]\n* = r')
elif line.startswith('#') or '={' not in line:

0 comments on commit a554f36

Please sign in to comment.