Subversion Repositories LCARS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
20 PointedEar 1
#!/bin/sh
2
 
3
[ $# -lt 3 ] && {
4
  echo >&2 "${0##*/} [-g GREY_VALUE] [-p PREFIX] [-s SUFFIX] START SID\
5
 TITLES..."
6
  exit 1
7
}
8
 
9
[ "$1" = '-g' ] &&
10
{
11
  shift
12
  user_grey=$1
13
  [ "$1" == '-' ] && user_grey=255,0,255,255
14
  user_grey="-g $user_grey"
15
  shift
16
}
17
 
18
[ "$1" = '-p' ] &&
19
{
20
  shift
21
  prefix=$1
22
  shift
23
}
24
 
25
[ "$1" = '-s' ] &&
26
{
27
  shift
28
  suffix=$1
29
  shift
30
}
31
 
32
start=$1
33
subtitle=$2
34
shift 2
35
 
36
sudo dc stop
37
i=$(($start))
38
while [ $# -gt 0 ]
39
do
40
  echo
41
  dvdsubtitles -t $i -s $subtitle $user_grey -o "$prefix$1$suffix"
42
  let i++
43
  shift
44
done
45
sudo dc start