diff 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
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/cd-backup.sh	Mon Feb 25 09:26:19 2013 +0000
     1.3 @@ -0,0 +1,33 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +TARGET="/home/r/tmp/image.iso"
     1.7 +
     1.8 +START=`cdrecord -msinfo`
     1.9 +
    1.10 +echo "$START"
    1.11 +
    1.12 +GRAFT_POINTS=''
    1.13 +
    1.14 +for var in "$@"
    1.15 +do 
    1.16 +    GRAFT_POINTS="$GRAFT_POINTS \"`basename "$var"`\"=\"$var\""
    1.17 +done
    1.18 +
    1.19 +
    1.20 +#echo $GRAFT_POINTS
    1.21 +
    1.22 +if [ "$START" == "0,0" ]; then
    1.23 +   COMMAND="mkisofs -iso-level 4 -rJT -o $TARGET -graft-points $GRAFT_POINTS"
    1.24 +   echo $COMMAND
    1.25 +   eval $COMMAND
    1.26 +else 
    1.27 +   COMMAND="mkisofs -iso-level 4 -rJT -M /dev/cdrom \
    1.28 +               -C $START -o $TARGET -graft-points $GRAFT_POINTS"
    1.29 +   echo $COMMAND
    1.30 +   eval $COMMAND
    1.31 +fi
    1.32 +
    1.33 +
    1.34 +echo "files copied to $TARGET. use 'burn-tmp-iso-image' to burn it."
    1.35 +
    1.36 +#cd-burn