mbligh | bb7b891 | 2006-10-08 03:59:02 +0000 | [diff] [blame] | 1 | #!/usr/bin/python2.4 |
| 2 | import os, re |
| 3 | |
| 4 | topdir = "/home/mirror/tko/abat" |
| 5 | index = "external.list" |
| 6 | |
| 7 | jobs = open(os.path.join(topdir, index), 'r').readlines() |
| 8 | jobs = [int(job) for job in jobs] |
| 9 | |
| 10 | for job in jobs: |
| 11 | control = "%s/%d/autobench.dat" % (topdir, job) |
| 12 | if not os.path.exists(control): |
| 13 | continue |
| 14 | variables = {} |
| 15 | for line in open(control, 'r').readlines(): |
| 16 | if line.startswith('+$'): |
| 17 | match = re.match(r'\+\$(\S+)\s+(\S?.*)', line) |
| 18 | variables{match.group(1)} = match.group(2) |
| 19 | if line.startswith('build '): |
| 20 | build = line |
| 21 | |
| 22 | if not re.match('(apw|mbligh|andyw|korgtest)', variables{'username'}): |
| 23 | print "bad username - %s" % variables{'username'} |
| 24 | continue |