#!/bin/bash if [ -z "$2" ]; then BASENAME=`echo "$1"|sed -e "s/\//_/g" -e "s/_video0_//g" -e "s/.99.99.rec//g" -e "s/.50.99.rec//g" -e 's/\\:/h/g' -e "s/:/h/" -e "s/_$//g" -e "s/STARGATE-SG1_//g" -e "s/%//g" -e "s/ //g" -e "s/.50.50.rec//g"|TR` else BASENAME="`echo $2|TR`" fi CUT=/tmp/cut FILES=`echo "$1"/[0-9]*.vdr|sed -e "s/\/\//\//g"` A=`dirname $BASENAME` if [ "$A" == "." ]; then OUT=/mnt/gentoo/anim BAS=$BASENAME else OUT=/mnt/gentoo/anim/`dirname $BASENAME` BAS=`basename $BASENAME` fi cd /tmp marks2bytepos.pl $1 > $CUT nice -n 4 projectx -cut $CUT -out $OUT -name $BAS -tom2p -id 0xE0,0xC0 $FILES if [ -e "$1"/info.vdr ];then cp "$1"/info.vdr $OUT/"$BAS".txt TXT2DONE $OUT/"$BAS".txt fi mv $OUT/$BAS\[pes\].m2p $OUT/$BAS.mpg rm $OUT/"$BAS"_log.txt $CUT