annotate cd-backup @ 4:5161d06652f9

changed paths and added cd-mount
author Robert McIntyre <rlm@mit.edu>
date Thu, 20 Oct 2011 13:36:26 -0700
parents d33008839340
children
rev   line source
rlm@3 1 #!/bin/sh
rlm@2 2
rlm@4 3 TARGET="/home/r/tmp/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