Mercurial > backup
diff 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 |
line wrap: on
line diff
1.1 --- a/cd-backup Tue Oct 18 21:38:45 2011 -0700 1.2 +++ b/cd-backup Wed Oct 19 01:22:14 2011 -0700 1.3 @@ -1,6 +1,33 @@ 1.4 -TARGET="/home/r/proj/scratch/cd.iso" 1.5 +#!/bin/sh 1.6 1.7 -mkisofs -iso-level 4 -o $TARGET "$@" 1.8 +TARGET="/home/r/proj/scratch/image.iso" 1.9 + 1.10 +START=`cdrecord -msinfo` 1.11 + 1.12 +echo "$START" 1.13 + 1.14 +GRAFT_POINTS='' 1.15 + 1.16 +for var in "$@" 1.17 +do 1.18 + GRAFT_POINTS="$GRAFT_POINTS \"`basename "$var"`\"=\"$var\"" 1.19 +done 1.20 + 1.21 + 1.22 +#echo $GRAFT_POINTS 1.23 + 1.24 +if [ "$START" == "0,0" ]; then 1.25 + COMMAND="mkisofs -iso-level 4 -rJT -o $TARGET -graft-points $GRAFT_POINTS" 1.26 + echo $COMMAND 1.27 + eval $COMMAND 1.28 +else 1.29 + COMMAND="mkisofs -iso-level 4 -rJT -M /dev/dvd \ 1.30 + -C $START -o $TARGET -graft-points $GRAFT_POINTS" 1.31 + echo $COMMAND 1.32 + eval $COMMAND 1.33 +fi 1.34 + 1.35 1.36 echo "files copied to $TARGET. use 'cd-burn' to burn it." 1.37 1.38 +#cd-burn 1.39 \ No newline at end of file