Created
June 19, 2016 02:44
-
-
Save erodozer/9915fcf6b7a08248d96ade22ffb24e33 to your computer and use it in GitHub Desktop.
Stupid simple bash script for properly ripping PS2 dvds and naming them by their SLUS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| device='/dev/sr0' | |
| mount=$(mount | grep $device | cut -d " " -f 3) | |
| DVD_NAME=$(find $mount -name "SLUS_*" | grep -o '[^/]*$') | |
| blockcount=$(isoinfo -d -i $device | grep "^Volume size is:" | cut -d " " -f 4) | |
| blocksize=$(isoinfo -d -i $device | grep "^Logical block size is:" | cut -d " " -f 5) | |
| dd if=$device bs=$blocksize count=$blockcount of=$DVD_NAME.iso |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment