Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Convert .dmg files to .iso files for buring elsewhere' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Convert .dmg files to .iso files for buring elsewhere
Authored by: juanfc on Jan 29, '04 11:51:40AM
Thanks a lot for this very useful trick. I have done the next tclscritpt. Don't forget to save it as (for example) dmg2iso with the -x bit activated (chmod +x dmg2iso)

#!/usr/bin/env tclsh

# dmg2iso
# juanfc (2004-01-29)

foreach f $argv {
    if {[file extensio $f] == ".dmg"} {
        eval exec {hdiutil convert "$f" -format UDTO -o [file rootname "$f"].iso}
    } else {
        eval exec {hdiutil convert "$f.dmg" -format UDTO -o "$f.iso"}
    }
} 

---
---
juan

[ Reply to This | # ]

Convert .dmg files to .iso files for buring elsewhere
Authored by: commandus on Aug 11, '05 11:23:42AM

Here's an alternative script using the bash shell:

----------------------------------------------------------------

#!/bin/bash
echo "Converting "$1".dmg to "$1".iso:"

hdiutil convert "$1".dmg -format UDTO -o "$1".iso

mv "$1".iso.cdr "$1".iso

----------------------------------------------------------------

Save as dmg2iso (Or whatever) and run:
chmod +x dmg2iso

To use:
$ dmg2iso image

You don't have to include the ".dmg" bit. It's assumed. The output file will be: image.iso

Enjoy.

Commandus



[ Reply to This | # ]