Commit 5b0827b1 authored by Bruno Coudoin's avatar Bruno Coudoin

Added mkdmg tool to ease MacOSX packaging.

parent 46425d5d
#!/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}"`
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment