Skip to content

Instantly share code, notes, and snippets.

@hernan43
Last active April 10, 2022 21:04
Show Gist options
  • Save hernan43/c8bcda477841511b3da522ac7e705a12 to your computer and use it in GitHub Desktop.
Save hernan43/c8bcda477841511b3da522ac7e705a12 to your computer and use it in GitHub Desktop.
CDI burning script first seen here https://ubuntuforums.org/showthread.php?t=1288517
#!/bin/sh
CDIIMG="$1"
cdirip "${CDIIMG}" -cdrecord
COUNTER="0"
MORE=true
while $MORE
do
COUNTER=`expr $COUNTER + 1`
NUMBER=`printf %02u $COUNTER`
ISOFILE=tdata${NUMBER}.iso
WAVFILE=taudio${NUMBER}.wav
if [ -f $WAVFILE ]; then
cdrecord dev=ATA:1,0,0 speed=4 -multi -audio $WAVFILE && rm $WAVFILE
elif [ -f $ISOFILE ]; then
cdrecord dev=ATA:1,0,0 speed=4 -multi -xa $ISOFILE && rm $ISOFILE
else
MORE=false
fi
done
eject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment