annotate cd-backup.sh @ 6:dc7c9557d412

correct references, rename.
author Robert McIntyre <rlm@mit.edu>
date Mon, 25 Feb 2013 09:26:19 +0000
parents
children 11334e7aed98
rev   line source
rlm@6 1 #!/bin/sh
rlm@6 2
rlm@6 3 TARGET="/home/r/tmp/image.iso"
rlm@6 4
rlm@6 5 START=`cdrecord -msinfo`
rlm@6 6
rlm@6 7 echo "$START"
rlm@6 8
rlm@6 9 GRAFT_POINTS=''
rlm@6 10
rlm@6 11 for var in "$@"
rlm@6 12 do
rlm@6 13 GRAFT_POINTS="$GRAFT_POINTS \"`basename "$var"`\"=\"$var\""
rlm@6 14 done
rlm@6 15
rlm@6 16
rlm@6 17 #echo $GRAFT_POINTS
rlm@6 18
rlm@6 19 if [ "$START" == "0,0" ]; then
rlm@6 20 COMMAND="mkisofs -iso-level 4 -rJT -o $TARGET -graft-points $GRAFT_POINTS"
rlm@6 21 echo $COMMAND
rlm@6 22 eval $COMMAND
rlm@6 23 else
rlm@6 24 COMMAND="mkisofs -iso-level 4 -rJT -M /dev/cdrom \
rlm@6 25 -C $START -o $TARGET -graft-points $GRAFT_POINTS"
rlm@6 26 echo $COMMAND
rlm@6 27 eval $COMMAND
rlm@6 28 fi
rlm@6 29
rlm@6 30
rlm@6 31 echo "files copied to $TARGET. use 'burn-tmp-iso-image' to burn it."
rlm@6 32
rlm@6 33 #cd-burn