17 lines
403 B
Plaintext
17 lines
403 B
Plaintext
function img2iso () {
|
|
if [ -z "$1" ]; then
|
|
# display usage if no parameters given
|
|
echo "Usage: img2iso <file_name>"
|
|
return 1
|
|
else
|
|
if [ -f "$1" ] ; then
|
|
filename=`basename $1 .img`
|
|
hdiutil convert ${filename}.img -format UDTO -o ${filename}.iso
|
|
mv ${filename}.iso.cdr ${filename}.iso
|
|
else
|
|
echo "'$n' - file does not exist"
|
|
return 1
|
|
fi
|
|
fi
|
|
}
|