updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / vdr-burn / vdr-plugin-burn / vdrburn-archive.sh
blob79ce2621f23967086cfb4e23013b809ec379864d
1 #!/bin/sh
3 # For DEBUG Output - can be left since logfiles are deleted when job finishes
4 set -x
6 # To make the script exit whenever a command fails (MUST NOT BE REMOVED)
7 set -e
9 # Some versions of growisofs refuse to start when run with sudo, and may
10 # misdetect this condition if vdr itself is started from a sudo session.
11 unset SUDO_COMMAND
13 case $1 in
14 mkiso)
15 genisoimage -V "$DISC_ID" -f -r -J -l -allow-lowercase -allow-multidot \
16 -graft-points $GRAFT_POINTS >"$ISO_FILE"
19 burndir)
20 SPEED=""
21 if [ $BURN_SPEED -gt 0 ]; then
22 SPEED="-speed=$BURN_SPEED"
24 growisofs -use-the-force-luke=tty $SPEED -Z $DVD_DEVICE \
25 -V "$DISC_ID" -f -r -J -l -allow-lowercase -allow-multidot \
26 -graft-points $GRAFT_POINTS
29 pipeiso)
30 genisoimage -V "$DISC_ID" -f -r -J -l -allow-lowercase -allow-multidot \
31 -graft-points $GRAFT_POINTS | tee "$ISO_FILE" > $ISO_PIPE
34 burniso)
35 SPEED=""
36 if [ $BURN_SPEED -gt 0 ]; then
37 SPEED="-speed=$BURN_SPEED"
39 growisofs -use-the-force-luke=tty $SPEED -dvd-compat \
40 -Z $DVD_DEVICE=$ISO_PIPE
43 recordingmark)
44 cp "$CONFIG_PATH/counters/standard" "$RECORDING_PATH/dvd.vdr"
47 archivemark)
48 ((DVD_ID = `cat $CONFIG_PATH/counters/standard | sed "s/^0*//"` + 1))
49 printf "%04d\n" $DVD_ID > "$CONFIG_PATH/counters/standard"
53 echo "Usage: $0 {demux}"
54 exit 1
56 esac
58 exit $?