Skip to content
Permalink
Browse files
Add :block: directive, to make svn paths readonly
  • Loading branch information
gstein committed Mar 25, 2021
1 parent 6b2a0ab commit e177f0d6090f6ebfa7158e143e4b00ff49e201d6
Showing 1 changed file with 12 additions and 1 deletion.
13 gen.py
@@ -123,7 +123,18 @@ def write_file(self, template, output):

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

0 comments on commit e177f0d

Please sign in to comment.