annotate cd-backup @ 3:d33008839340

cd backup now works!
author Robert McIntyre <rlm@mit.edu>
date Wed, 19 Oct 2011 01:22:14 -0700
parents 1e962e354810
children 5161d06652f9
rev   line source
rlm@3 1 #!/bin/sh
rlm@2 2
rlm@3 3 TARGET="/home/r/proj/scratch/image.iso"
rlm@3 4
rlm@3 5 START=`cdrecord -msinfo`
rlm@3 6
rlm@3 7 echo "$START"
rlm@3 8
rlm@3 9 GRAFT_POINTS=''
rlm@3 10
rlm@3 11 for var in "$@"
rlm@3 12 do
rlm@3 13 GRAFT_POINTS="$GRAFT_POINTS \"`basename "$var"`\"=\"$var\""
rlm@3 14 done
rlm@3 15
rlm@3 16
rlm@3 17 #echo $GRAFT_POINTS
rlm@3 18
rlm@3 19 if [ "$START" == "0,0" ]; then
rlm@3 20 COMMAND="mkisofs -iso-level 4 -rJT -o $TARGET -graft-points $GRAFT_POINTS"
rlm@3 21 echo $COMMAND
rlm@3 22 eval $COMMAND
rlm@3 23 else
rlm@3 24 COMMAND="mkisofs -iso-level 4 -rJT -M /dev/dvd \
rlm@3 25 -C $START -o $TARGET -graft-points $GRAFT_POINTS"
rlm@3 26 echo $COMMAND
rlm@3 27 eval $COMMAND
rlm@3 28 fi
rlm@3 29
rlm@2 30
rlm@2 31 echo "files copied to $TARGET. use 'cd-burn' to burn it."
rlm@2 32
rlm@3 33 #cd-burn