create_ISO_image_from_DVD

Christians-iMac:create_ISO_image_from_DVD chunrix$ cat create_ISO_image.sh
#!/bin/bash

hdiutil=$(which hdiutil)
dst_dir=$(echo ~/Desktop)

echo 'Please use DISK UTILITY app to create a CDR file from CD DISC first.'
echo 'DISK UTILITY will be opened automatically within 5 sec.'
echo 'Howto: Open Disk Utility-->File-->New Image-->Image from CD DISC..'

sleep 5
open -a "/Applications/Utilities/Disk Utility.app/"

read -p 'Pls drag the CDR file into terminal(dont leave a space at the end of the filename), then press ENTER: '

filename=$(basename "$REPLY" | sed 's/....$//')

echo 'The filename would be: ' "$filename"
echo 'Pls check the file in folder: ' "$dst_dir"
#echo "$REPLY"

#hdiutil makehybrid -iso -joliet -o /Users/chunrix/Desktop/KODV_0069.iso /Users/chunrix/Desktop/KODV_0069.cdr
hdiutil makehybrid -iso -joliet -o "$dst_dir"/"$filename".iso "$REPLY"

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章