allow copying files into a dmg
authorDiane Trout <diane@caltech.edu>
Wed, 1 Nov 2006 23:55:26 +0000 (23:55 +0000)
committerDiane Trout <diane@caltech.edu>
Wed, 1 Nov 2006 23:55:26 +0000 (23:55 +0000)
the manual is a .html file that needed to be copied into the dmg
which required a small update to osxdist.py

makelib/osxdist.py

index b6b6134ae52de814d2b4d97b4b2f6d4bf526d120..397832ec06f789e820a77d069da008ab1b445077 100644 (file)
@@ -104,7 +104,10 @@ def makedmg(dirlist, volname):
     if d[-1] == '/':
       d = d[:-1]
     tail = os.path.split(d)[-1]
-    copytree(d, os.path.join(mount_point, tail))
+    if (os.path.isdir(d)):
+      copytree(d, os.path.join(mount_point, tail))
+    else:
+      copy(d, os.path.join(mount_point, tail))
 
   call(['hdiutil','detach',mount_point])
   call(['hdiutil','convert',rwdmg,'-format','UDZO','-o',dmg])