commit 444b37eec7faf0db2bb922361207dad35ca4d888 parent 7d04bf76731ebdee8862063bae3a23fd35ae1b04 Author: lostd <lostd@2f30.org> Date: Mon, 12 Aug 2013 01:37:03 +0300 my data cd burning script got better Diffstat:
M | burndisc | | | 15 | +++++++++++++-- |
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/burndisc b/burndisc @@ -1,9 +1,20 @@ #!/bin/sh -DEV=/dev/cd0c -VOLID=$(basename $PWD)$(date +"%Y%m%d") +# try common names for cdrom devs +for D in $CDROM /dev/cdrom /dev/cd0c /dev/sr0; do + if test -b $D; then DEV=$D && break; fi +done +if test -z "$DEV"; then + echo create a /dev/cdrom symlink or set the CDROM env var + exit 1 +fi +echo using device $DEV +# use dir name as volume id +VOLID=$(basename $PWD) echo -n $(du -shL .) $VOLID"? " && read + +# burn on the fly SIZ=$(mkisofs -J -R -f -q -print-size .) mkisofs -J -R -f -V $VOLID . \ | cdrecord -dev=$DEV -speed=1 -driveropts=burnfree \