Burning

From chaoswiki
Revision as of 13:29, 30 April 2006 by Atari (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Just a practicle simple script for local file burning. It must be executed as root because of cdrecord.

Code: burn.sh
#!/bin/bash

case "$1" in
        clean)
                option="dev=ATA:1,0,0 blank=fast -v"
                cdrecord $option
        ;;
        file)
                mkisofs -r -R -J -l -allow-leading-dots "$2" | cdrecord dev=ATA:1,0,0 -v --eject  -
        ;;
        iso)
                echo "$2 gets burned"
                option="-v -eject dev=ATA:1,0,0 $2"
                cdrecord $option
        ;;
        sound)
                DIRECTORY="/root/tmp/sound/"
                cd "$2"
                cp * "$DIRECTORY"
                cd $DIRECTORY
                mkdir -p wav
                for i in *; do mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader:file="wav/${i}.wav" "$i" ; done
                normalize -m $DIRECTORY/wav/*.wav
                cdrecord -v dev=ATA:1,0,0 -audio -pad wav/*.wav
                rm wav/*.wav
                rm *
        ;;
        *)
        echo "(clean|file|iso)"
        ;;
esac


Any Suggestions?