2010-06-29 22:19:09 +00:00
|
|
|
import sys, os
|
|
|
|
|
2010-07-22 14:38:59 +00:00
|
|
|
outmanifest = sys.argv[1]
|
|
|
|
manifestdirs = sys.argv[2:]
|
2010-06-29 22:19:09 +00:00
|
|
|
|
2010-07-22 14:38:59 +00:00
|
|
|
outfd = open(outmanifest, 'w')
|
2010-06-29 22:19:09 +00:00
|
|
|
|
2010-07-22 14:38:59 +00:00
|
|
|
for manifestdir in manifestdirs:
|
2010-06-29 22:19:09 +00:00
|
|
|
if not os.path.isdir(manifestdir):
|
2010-07-22 14:38:59 +00:00
|
|
|
print >>sys.stderr, "Warning: trying to link manifests in missing directory '%s'" % manifestdir
|
2010-06-29 22:19:09 +00:00
|
|
|
continue
|
|
|
|
|
|
|
|
for name in os.listdir(manifestdir):
|
|
|
|
infd = open(os.path.join(manifestdir, name))
|
|
|
|
print >>outfd, "# %s" % name
|
|
|
|
outfd.write(infd.read())
|
|
|
|
print >>outfd
|
|
|
|
infd.close()
|
|
|
|
|
2010-07-22 14:38:59 +00:00
|
|
|
outfd.close()
|