Initial check-in

This commit is contained in:
Diederik de Groot
2017-11-13 01:43:48 +01:00
commit 82b5aadc13
1623 changed files with 350739 additions and 0 deletions

10
tftpboot/firmware/mkregex.py Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env python
from hachoir_regex import parse
from os import listdir,walk,path
from os.path import basename,join,isdir
rootdir = ".";
for subdir in next(walk(rootdir))[1]:
paths = listdir(subdir)
as_regex = [parse(path) for path in paths]
print "^{}$ /firmware/{}/\\1".format(reduce(lambda x, y: x | y, as_regex), basename(subdir))