allow copying files into a dmg
[mussa.git] / 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])