Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Thank you for using ** HEAT **
- # This is the Glenn Whittington and Lakota Morris project (2010)
- # This program is designed to (clone copy) karaoke/cdg disk
- # and pull cddb data and save it as a text file.
- # This program requires cdgtools 0.3.2
- if ! which cdgtools > /dev/null; then
- echo “Please install cdgtools or make sure it is in your path”
- exit
- fi
- yn() {
- printf " Reply [y/n]: "
- read yn
- [[ "$yn" != y ]] && [[ "$yn" != n ]] && yn
- }
- # This software comes with no waranty, use at your own risk.
- # -----------------------------------------
- # Lakota - need to change to a temp/local file
- #mkdir -p /tmp/heat
- mkdir -p ./heat
- cd ./heat
- # Lakota - Insert new cd/ make sure you have a new cd in your CD ROM
- echo "Make sure you have a CD in the drive."
- # -----------------------------------------
- # using cdrdao to read cd and pull cddb data and write BIN & TOC & TEXT files
- cdrdao read-cd --driver generic-mmc-raw --device /dev/sr0 --read-subchan rw_raw --with-cddb mycd.toc | cat > mycd.txt
- eject
- # -----------------------------------------
- # using cdrdao to show how much space you need on your blank cd
- cdrdao toc-info mycd.toc
- # -----------------------------------------
- # Lakota - show that cddb data has been writen to file as text and ask if want to copy cd/ end
- echo "cddb data has been written to file."
- echo "Would you like to copy the CD? "
- yn
- [[ "$yn = y" ]] && cdrdao write --device /dev/sr0 --speed 8 mycd.toc
- # -----------------------------------------
- # Lakota - ask if want to rip TOC & BIN to MP3 & CDG files
- echo "Want to rip TOC & BIN to MP3 & CDG files? "
- [[ "$yn = y" ]] && cdgrip mycd.toc
- echo "Want to delete TOC file?"
- [[ "$yn = y" ]] && rm -iv mycd.toc
- echo "Want to delete BIN file?"
- [[ "$yn = y" ]] && rm -iv data.bin
- #------------------ EOF -------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement