Created
December 18, 2019 23:54
-
-
Save jjwatt/2eaf0a63fde4bef23acc2b84f8aa83fe to your computer and use it in GitHub Desktop.
Burn Duo-R/PCE-CD/tg16 CD discs in Linux
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
#!/usr/bin/env bash | |
_infile="$1" | |
_basename="${_infile%%.zip}" | |
_tocfile="${_basename}".toc | |
CUECONVERT=cueconvert | |
unzip -tq "${_infile}" || exit 1 | |
mkdir -p "${_basename}" | |
cd "${_basename}" | |
unzip ../"${_infile}" | |
_cuefile="$(find ./ -iname '*.cue')" | |
"${CUECONVERT}" -i cue "${_cuefile}" > "${_tocfile}" | |
# Kind of gnarly sed command | |
sed -E -i ':a ; $!N ; s/TRACK MODE1_RAW\s+FILE/TRACK MODE1_RAW\nDATAFILE/ ; ta ; P ; D' "${_tocfile}" | |
cdrdao simulate --driver generic-mmc \ | |
--swap \ | |
--speed 16 \ | |
"${_tocfile}" || exit 1 | |
cdrdao write --driver generic-mmc \ | |
--swap \ | |
--speed 16 \ | |
"${_tocfile}" || exit 1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, this worked perfectly! Thank you!