You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
409 B
Bash
18 lines
409 B
Bash
#!/bin/bash
|
|
|
|
# Rip a CD to a CHD file for archiving.
|
|
|
|
disc_name="$1"
|
|
if [ -e "$disc_name" ]; then
|
|
echo "disc name required."
|
|
exit 1
|
|
fi
|
|
|
|
# TODO: Don't assume there is only one optical drive.
|
|
cdrdao read-cd --datafile "$disc_name.bin" --read-raw "$disc_name.toc" || exit 1
|
|
toc2cue "$disc_name.toc" "$disc_name.cue" || exit 1
|
|
chdman createcd -i "$disc_name.cue" -o "$disc_name.chd"
|
|
|
|
rm "$disc_name.toc"
|
|
|