#!/bin/sh # burn is a simple wrapper around wodim to facilitate burning arbitrary files # to CDR, which might be pre-mastered ISO filesystem images or whatever. # # Copyright (c) 2007-2011 by Reid Priedhorsky, . # # This script is distributed under the terms of the GNU General Public # License; see http://www.gnu.org/licenses/gpl.txt for more information. device=/dev/cdrom driveropts= #burnfree speed=99 mode=-dao dummy= overburn= fs=32m if [ "$1" = '' -o "$1" = '--help' ]; then echo "usage:" echo " $ burn [OPTIONS] IMAGE" echo "options:" echo " -D DEVICE set device (default $device)" echo " -o DRIVEROPTS set driver options (default $driveropts)" echo " -s SPEED set speed (default $speed)" echo " -n set dummy mode" echo " -r set overburn mode" exit 1 fi while getopts D:no:s:r f; do case $f in D) device=$OPTARG ;; n) dummy='-dummy' ;; o) driveropts="driveropts=$OPTARG" ;; s) speed=$OPTARG ;; r) overburn=-overburn ;; esac done shift `expr $OPTIND - 1` echo "** device: $device" echo "** driveropts: $driveropts" echo "** speed: $speed" echo "** modes: $mode $dummy $overburn" echo wodim $dummy $mode dev=$device speed=$speed fs=$fs $driveropts $overburn "$*" wodim -v $dummy $mode dev=$device speed=$speed fs=$fs $driveropts $overburn "$*"