[gcompris/gcomprixogoo] Added mkdmg tool to ease MacOSX packaging.



commit 5b0827b1de473332f38c8730a07325c2500bd122
Author: Bruno Coudoin <bruno ordinateur-de-bruno-coudoin local>
Date:   Sun Apr 25 17:31:17 2010 +0200

    Added mkdmg tool to ease MacOSX packaging.

 macosx/mkdmg |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/macosx/mkdmg b/macosx/mkdmg
new file mode 100755
index 0000000..a4c0769
--- /dev/null
+++ b/macosx/mkdmg
@@ -0,0 +1,19 @@
+#!/usr/bin/env ruby
+
+# usage error
+if ARGV.length < 1 or ARGV.length > 2 then
+    $stderr.puts( "Usage: #{File.basename( $0 )} directory [cd name]" )
+    exit( 1 )
+end
+
+# get variables
+dir = ARGV.shift.sub( /\/$/, "" )
+volname = if ARGV.length == 0 then
+        File.basename( File.expand_path( dir ) )
+    else
+        ARGV.shift
+    end
+output = "#{dir}.dmg"
+
+# dmg the folder
+`hdiutil create -fs HFS+ -srcfolder "#{dir}" -volname "#{volname}" "#{output}"`



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]