#!/bin/sh # /usr/local/bin/burncd # BurnCD - Make ISO and Toast It # Usage: burncd filename.avi #--Options to Set-- GREEN="\033[0;32m" NO_COLOUR="\033[0m" #--Options to Set-- done_print () { rm $x echo -e "\n${GREEN}DONE!${NO_COLOUR}" } # Random ISO File Name x=$$.iso echo -e "\nCreating ISO Image of ${GREEN}$1${NO_COLOUR}" /usr/bin/mkisofs -r -J -o "$x" "$1" > /dev/null 2>&1 echo -e "\nToasting ${GREEN}$1${NO_COLOUR}" /usr/bin/cdrecord -v speed=48 dev=0,0,0 -data $x > /dev/null 2>&1 done_print # Todo List: # 1. Add stuff to see if they have permissions like root to use this # 2. Make sure mkisofs returns ok before running cdrecord # 3. Make sure cdrecord returns ok before echoing done # 4. Add something to verify written disk with original file # 5. Print Usage Info if not CLi arguments.