2010-06-29 15:19:09 -07:00
|
|
|
import sys, os
|
|
|
|
|
2010-07-22 07:38:59 -07:00
|
|
|
outmanifest = sys.argv[1]
|
|
|
|
manifestdirs = sys.argv[2:]
|
2010-06-29 15:19:09 -07:00
|
|
|
|
2010-07-22 07:38:59 -07:00
|
|
|
outfd = open(outmanifest, 'w')
|
2010-06-29 15:19:09 -07:00
|
|
|
|
2010-07-22 07:38:59 -07:00
|
|
|
for manifestdir in manifestdirs:
|
2010-06-29 15:19:09 -07:00
|
|
|
if not os.path.isdir(manifestdir):
|
2010-07-22 07:38:59 -07:00
|
|
|
print >>sys.stderr, "Warning: trying to link manifests in missing directory '%s'" % manifestdir
|
2010-06-29 15:19:09 -07: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 07:38:59 -07:00
|
|
|
outfd.close()
|