Back to index

enigmail  1.4.3
link-manifests.py
Go to the documentation of this file.
00001 import sys, os
00002 
00003 outmanifest = sys.argv[1]
00004 manifestdirs = sys.argv[2:]
00005 
00006 outfd = open(outmanifest, 'w')
00007 
00008 for manifestdir in manifestdirs:
00009     if not os.path.isdir(manifestdir):
00010         print >>sys.stderr, "Warning: trying to link manifests in missing directory '%s'" % manifestdir
00011         continue
00012 
00013     for name in os.listdir(manifestdir):
00014         infd = open(os.path.join(manifestdir, name))
00015         print >>outfd, "# %s" % name
00016         outfd.write(infd.read())
00017         print >>outfd
00018         infd.close()
00019 
00020 outfd.close()