Last active
December 16, 2016 14:59
-
-
Save Tatsh/bc3947f83b2e4e00d41d to your computer and use it in GitHub Desktop.
Burn a CDI (not by me)
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
#!/usr/bin/env bash | |
set -o errexit | |
cdi_img="$1" | |
device="${2:-/dev/sr0}" | |
cdirip "$cdi_img" -cdrecord | |
i=1 | |
while true; do | |
n=$(printf '%02u' "$i") | |
iso="tdata${n}.iso" | |
wav="taudio${n}.wav" | |
if [ -f "$wav" ]; then | |
cdrecord "dev=${device}" speed=4 -multi -audio "$wav" | |
rm "$wav" | |
elif [ -f "$iso" ]; then | |
cdrecord "dev=${device}" speed=4 -multi -xa "$iso" | |
rm "$iso" | |
else | |
break | |
fi | |
((i++)) | |
done | |
eject |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment