Skip to content

Instantly share code, notes, and snippets.

@vando vando/cdiburn.sh
Created Jan 11, 2018

Embed
What would you like to do?
Burn CDI images (Dreamcast) in Debian
#!/bin/bash
#
# Script from http://dcemulation.org/phpBB/viewtopic.php?f=48&t=98311
# I just updated it for running into Debian 9.
if whereis -b cdirip | grep -vq /bin
then
echo "cdirip isn't installed, please run:"
echo ""
echo " wget -qO - https://github.com/jozip/cdirip/archive/v0.6.3.tar.gz | tar -zxvf - -C /tmp"
echo " cd /tmp/cdirip-0.6.3"
echo " make && sudo make install DESTDIR=/usr/local"
echo ""
exit 1
fi
if whereis -b wodim | grep -vq /bin
then
echo "wodim isn't installed, please run:"
echo ""
echo " sudo apt-get install -y wodim"
echo ""
exit 1
fi
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
wodim dev=/dev/cdrom speed=4 -multi -audio $WAVFILE && rm $WAVFILE
elif [ -f $ISOFILE ]
then
wodim dev=/dev/cdrom speed=4 -multi -xa $ISOFILE && rm $ISOFILE
else
MORE=false
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.