Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cd_backup [2018/12/14 20:30]
beandog created
cd_backup [2018/12/14 20:36] (current)
beandog
Line 4: Line 4:
  
 <​code>​ <​code>​
 +#​!/​bin/​bash 
 +device="/​dev/​cdrom"​ 
 +test -z "​$1"​ || device="​$1"​ 
 +disc_id="​$(cd-discid $device | cut -d ' ' -f 1)" 
 +if [[ -z "​$disc_id"​ ]]; then 
 +        echo "Could not grab Disc ID" 
 +        exit 1 
 +fi 
 +if [[ ! -e "​${disc_id}.wav"​ ]]; then 
 +        cdparanoia -d $device 1- ${disc_id}.wav 
 +fi 
 +if [[ ! -e "​${disc_id}.toc"​ ]]; then 
 +        yes 1 | cdrdao read-toc --device $device --with-cddb ${disc_id}.toc 
 +fi 
 +if [[ ! -e "​${disc_id}.cue"​ ]]; then 
 +        cueconvert -i toc -o cue ${disc_id}.toc ${disc_id}.cue 
 +fi 
 +</​code>​

Navigation