Created
August 22, 2012 14:23
-
-
Save punytan/3426085 to your computer and use it in GitHub Desktop.
This file contains 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
use strict; | |
use warnings; | |
main(@ARGV);exit; | |
sub main { | |
my $path = shift or help(); | |
my $title = shift or help(); | |
my $dir = "$path/$title"; | |
mkdir $dir unless -d $dir; | |
chdir $dir; | |
`cdrdao read-cd --device /dev/cdrom --datafile "CDImage.bin" "CDImage.toc"`; | |
`toc2cue "CDImage.toc" "CDImage.cue"`; | |
`eject` | |
} | |
sub help { | |
print <<"EOM"; | |
usage: $0 /path/to/your/cd/lib CD_TITLE | |
will generates "/path/to/your/cd/lib/CD_TITLE/CDImage.{bin,toc,cue}" | |
EOM | |
exit; | |
} | |
__END__ |
This file contains 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
use strict; | |
use warnings; | |
main();exit; | |
sub main { | |
my $path = shift @ARGV or help(); | |
my $title = shift @ARGV or help(); | |
`sudo mount /dev/dvd /media/dvd`; | |
`vobcopy -m -x -t $title`; | |
`mkisofs -v --dvd-video -o $path/$title.iso ./$title/`; | |
`sudo umount /media/dvd`; | |
`eject`; | |
} | |
sub help { | |
print <<"EOM"; | |
Usage: $0 /path/to/your/dvd/lib DVD_TITLE | |
will generate "/path/to/your/dvd/lib/DVD_TITLE.iso" | |
EOM | |
exit 1; | |
} | |
__END__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment