]> git.wh0rd.org - dump.git/blob - examples/dump_on_cd_2/DE/dump_userexit_DVD
Corrections from Georg Lippold
[dump.git] / examples / dump_on_cd_2 / DE / dump_userexit_DVD
1 #!/bin/bash
2 # supplied info from "dump -F":
3 # $1 = filename
4 # $2 = sequence number
5
6 NUM=$(($2+1))
7 RECORD_BIN="/usr/bin/dvdrecord dev=0,0,0 fs=64M speed=2 "
8 CD_CAPACITY=4300
9 TSIZE="$(echo "$CD_CAPACITY*1024*1024" | bc -l )"
10 echo "Bitte die naechste DVD einlegen (No. $NUM)"
11 ANSWER=""
12 while [ "$ANSWER" != "j" ] ; do
13 read -p "Ist die DVD bereit? (j/n)" ANSWER
14 if [ "$ANSWER" == "j" ] ; then
15 $RECORD_BIN -blank=fast
16 $RECORD_BIN -dao -eject -pad -tsize=$TSIZE -data $1 &
17 exit 0
18 elif [ "$ANSWER" == "n" ] ; then
19 EXIT=""
20 read -p "Wollen Sie abbrechen? (j/n)" EXIT
21 if [ "$EXIT" == "j" ] ; then
22 exit 1
23 fi
24 fi
25 done