|
|
Make a .dmg from any directory
here's an even simpler and more safe script:
#!/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}"`
---
Make a .dmg from any directory
And here is an AppleScript version,
Make a .dmg from any directory
Tristan it might be easier to use if the path is absolute and not relative. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|