Set the cut path properly when a non-default output path is specified
[atscap.git] / xtc.sh
blob276c02b2c44798a802f2ab1ef0d9b70311d4a945
1 #!/bin/bash
2 # main capture directory (use XFS filesystem for speed)
3 DIR=/dtv
4 # cut directory (symlink to another physical hd for speed)
5 CUTDIR=/dtv/cut
6 EDITOR=xtscut
7 # cut files are written here
8 EDITOPT="-p "$CUTDIR
9 URI=$1
10 # remove xtc://host:port/ and feed DIR/[dir/]name to xtscut
11 CUT1=`expr "$URI" : 'xtc://'`
12 HOSTFILE=${URI:CUT1}
13 CUT2=`expr index "$HOSTFILE" '/'`
14 NAME=${HOSTFILE:CUT2}
16 # change this to local mount used for your remote capture directory
17 EDITFILE=$DIR/$NAME
18 # changes URI to basename for playback from mounted filesystem
20 # uncomment this for playback over local mount directory/filename.ts
22 XTERMCFG="xterm -fn 10x20 -fg white -bg black -n xtscut -e"
23 $XTERMCFG $EDITOR $EDITOPT $EDITFILE