Shell script, Schmell script...do it in Python:

I got this from someone somewhere long ago...

import sys, os, os.path
import commands

if len(sys.argv)  == 2:
     dir = sys.argv[1]
     print "Creating disk image %s.dmg" % (dir)
     status, output = commands.getstatusoutput("hdiutil create - 
volname %s -fs HFS+ -srcfolder %s %s.dmg" % (dir,dir, dir))
else:
     sys.stderr.write("***ERROR: must provide folder to source.\n")
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to