]> git.wh0rd.org - dump.git/blob - examples/dump_on_cd_2/EN/dump_userexit_CD
Corrections from Georg Lippold
[dump.git] / examples / dump_on_cd_2 / EN / dump_userexit_CD
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 echo "Please insert the next CD (No. $NUM)"
9 ANSWER=""
10 while [ "$ANSWER" != "y" ] ; do
11 read -p "Is the CD ready? (y/n)" ANSWER
12 if [ "$ANSWER" == "y" ] ; then
13 $RECORD_BIN -blank=fast
14 $RECORD_BIN -eject -pad -data $1 &
15 exit 0
16 elif [ "$ANSWER" == "n" ] ; then
17 EXIT=""
18 read -p "Do you really want to exit? (y/n)" EXIT
19 if [ "$EXIT" == "y" ] ; then
20 exit 1
21 fi
22 fi
23 done