]> git.wh0rd.org - dump.git/blob - examples/dump_on_cd_2/DE/dump_userexit_CD
Corrections from Georg Lippold
[dump.git] / examples / dump_on_cd_2 / DE / 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/cdrecord speed=10 dev=0,0,0 fs=64M "
8 # CD_CAPACITY=700
9 # TSIZE="$(echo "$CD_CAPACITY*1024*1024" | bc -l )"
10 echo -e "Bitte die naechste CD einlegen (No. $NUM)\n"
11 ANSWER=""
12 while [ "$ANSWER" != "j" ] ; do
13 read -p "Ist die CD bereit? (j/n)" ANSWER
14 if [ "$ANSWER" == "j" ] ; then
15 $RECORD_BIN -eject -pad -data $1 &
16 exit 0
17 elif [ "$ANSWER" == "n" ] ; then
18 EXIT=""
19 read -p "Wollen Sie abbrechen? (j/n)" EXIT
20 if [ "$EXIT" == "j" ] ; then
21 exit 1
22 fi
23 fi
24 done