File: writtercontrol

package info (click to toggle)
cdcontrol 1.90-1.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 160 kB
  • ctags: 16
  • sloc: sh: 944; makefile: 26
file content (47 lines) | stat: -rwxr-xr-x 1,796 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# Receive as first argument the image that will be written, as secong the
# CD writter number and third the variable name that contais the SCSI ID 
# parameters of writter
#
source /usr/lib/cdcontrol/check-cdcontrol-codes
if [ "${IMG_TYPE}" = "A" ];then

 if [ ${VERBOSE} = 0 ];then
  cdrecord -dev=`eval echo ${3}` -speed=${W_SPEED} -fs=${CACHE}m \
       ${EXTRA_AREC_OPT} ${1} &>${TMP_DIR}/recorder${2}-out
 else
  if uname -s|grep -i 'Linux';then
   cdrecord -dev=`eval echo ${3}` -speed=${W_SPEED} -fs=${CACHE}m \
        ${EXTRA_AREC_OPT} ${1} |tee /tmp/v-recorder${2}-out &>/dev/tty$[${2}+1]
  elif uname -s|grep -i 'bsd';then
    cdrecord -dev=`eval echo ${3}` -speed=${W_SPEED} -fs=${CACHE}m \
        ${EXTRA_AREC_OPT} ${1} |tee /tmp/v-recorder${2}-out &>/dev/ttyv$[${2}+1]
  else
    ${DIALOG} --backtitle $"CDcontrol v${CDC_VERSION}" \
         --msgbox $"Operating system yet not supported by CDControl, aborting." 7 60
  fi
 fi

elif [ "${IMG_TYPE}" = "D" ];then

 if [ ${VERBOSE} = 0 ];then
  cdrecord -dev=`eval echo ${3}` -speed=${W_SPEED} -fs=${CACHE}m \
       ${EXTRA_DREC_OPT} ${1} &>${TMP_DIR}/recorder${2}-out
 else
  if uname -s|grep -i 'Linux';then
   cdrecord -dev=`eval echo ${3}` -speed=${W_SPEED} -fs=${CACHE}m \
        ${EXTRA_DREC_OPT} ${1} |tee /tmp/v-recorder${2}-out &>/dev/tty$[${2}+1]
  elif uname -s|grep -i 'bsd';then
    cdrecord -dev=`eval echo ${3}` -speed=${W_SPEED} -fs=${CACHE}m \
        ${EXTRA_DREC_OPT} ${1} |tee /tmp/v-recorder${2}-out &>/dev/ttyv$[${2}+1]
  else
    ${DIALOG} --backtitle $"CDcontrol v${CDC_VERSION}" \
         --msgbox $"Operating system yet not supported by CDControl." 7 60
  fi
 fi
 
fi
check_cdcontrol_codes $2 $3
if [ ${VERBOSE} = 0 ];then rm -f ${TMP_DIR}/recorder$2-out;fi
rm -f ${TMP_DIR}/recorder$2-busy