Created
January 11, 2018 22:14
-
-
Save facundobianco/356b4d791cc38b52bb77eed64e3fb795 to your computer and use it in GitHub Desktop.
Burn CDI images (Dreamcast) in Debian
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
#!/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