have different dists
[camarabuntu.git] / bin / make-cd-iso.py
blob796efcf2d5c6f2597699d7a90aa42189d71e0ab2
1 #! /usr/bin/python
3 import sys
4 from optparse import OptionParser
6 parser = OptionParser()
8 parser.add_option( "-f", "--iso-file",
9 dest="isofile", metavar="FILE", type="string", default=None,
10 help="The filename of the resultant ISO file" )
12 parser.add_option( "-d", "--dir", "--directory",
13 dest="dir", metavar="DIR", type="string", default=None,
14 help="The directory of the CD files" )
16 parser.add_option( "-n", "--name",
17 dest="name", metavar="NAME", type="string", default=None,
18 help="The CD name" )
20 (options, args) = parser.parse_args()
23 if options.isofile is None or options.dir is None or options.name is None:
24 parser.print_help()
25 sys.exit(1)
27 import commands
29 status, output = commands.getstatusoutput("""
30 mkisofs -r -V "%s" \
31 -cache-inodes \
32 -J -l -b isolinux/isolinux.bin \
33 -c isolinux/boot.cat -no-emul-boot \
34 -boot-load-size 4 -boot-info-table \
35 -o "%s" "%s" """ % (options.name, options.isofile, options.dir ) )
37 if status != 0:
38 print output