#!/bin/bash # # This script is useful for burning the contents of the current # directory to a CD. It reduces the work of creating a normal # data CD to just typing "danger-burn" and hitting ENTER twice. # # Note that if you are going to use this to create multi-session # CDs, then you will want to run "cdrecord -dev=1,0,0 -msinfo" # first, to figure out which magic numbers to give mkisofs's -C # argument. See /usr/doc/cdrecord*/README.multi for more info. # KERNELVERSION=$(uname -r |cut -d. -f1-2) if [ $KERNELVERSION = 2.2 ]; then CDR_DEVICE="1,0,0" # you may want to change this! else CDR_DEVICE="2,0,0" # you may want to change this! fi cat << EOF Preparing to burn current directory directly to disk, CTRL-C cancels." Useful mkisofs flags: -f follow symlinks -J Joliet ... -R Rock Ridge -r "Smart" Rock Ridge -T Generate TRANS.TBL files -C n,m "Magic" values for multisession images -M img Location of old CD image (for multisession) Example: -J -r -f -T -C 1234,12123 -M /dev/cdrom Default: -J -r EOF echo -n "Args for mkisofs: " read MKISOFS if [ "$MKISOFS" = "" ]; then MKISOFS="-J -r" fi cat <