]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_codesigning/gke/gkmerge
3 # gkmerge - merge Gatekeeper whitelist snippets
5 # gkmerge [--output name] files...
6 # Takes GKE data from all files, merges it together, and writes it to a new snippet file 'output'.
22 print >>sys
.stderr
, "%s: %s" % (sys
.argv
[0], whatever
)
29 parser
= argparse
.ArgumentParser()
30 parser
.add_argument("--output", default
="./snippet.gke", help="name of output file")
31 parser
.add_argument('source', nargs
='+', help='files generated by the gkrecord command')
32 args
= parser
.parse_args()
36 # Merge all the plist data from the input files, overriding with later files
39 for source
in args
.source
:
40 data
= plistlib
.readPlist(source
)
45 # Write it back out as a snippet file
47 plistlib
.writePlist(gkedict
, args
.output
)
48 print "Wrote %d authority records + %d signatures to %s" % (
49 len(gkedict
["authority"]), len(gkedict
["signatures"]), args
.output