]> git.wh0rd.org - dump.git/blobdiff - examples/dump_on_cd_2/EN/dump_userexit_DVD
New examples for dumping on CD/DVD...
[dump.git] / examples / dump_on_cd_2 / EN / dump_userexit_DVD
diff --git a/examples/dump_on_cd_2/EN/dump_userexit_DVD b/examples/dump_on_cd_2/EN/dump_userexit_DVD
new file mode 100644 (file)
index 0000000..589e184
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+# supplied info from "dump -F":
+# $1 = filename
+# $2 = sequence number
+
+NUM=$(($2+1))
+RECORD_BIN="/usr/bin/dvdrecord dev=0,0,0 fs=64M speed=2 "
+CD_CAPACITY=4300
+TSIZE="$(echo "$CD_CAPACITY*1024*1024" | bc -l )"
+echo "Please insert the next DVD (No. $NUM)"
+ANSWER=""
+while [ "$ANSWER" != "y" ] ; do
+       read -p "Is the DVD ready? (y/n)" ANSWER
+       if [ "$ANSWER" == "y" ] ; then
+               $RECORD_BIN -blank=fast
+               $RECORD_BIN -dao -eject -pad -tsize=$TSIZE -data $1 ; echo "Is the DVD ready? (y/n)" &
+               exit 0
+       elif [ "$ANSWER" == "n" ] ; then
+               EXIT=""
+               read -p "Do you really want to exit? (y/n)" EXIT
+               if [ "$EXIT" == "y" ] ; then
+                       exit 1
+               fi
+       fi
+done