Bug #392 ยป hts-postproc.sh
1 |
#!/bin/sh
|
---|---|
2 |
|
3 |
MKVFILE=$1 |
4 |
POSTPROC="/usr/bin/mkvmerge" |
5 |
|
6 |
if [ -z "$MKVFILE" ] ; then |
7 |
echo "Post-processings for HTS Tveheadend recorded .mkv." |
8 |
echo "Usage: $0 /full/path/to/the-record.mkv" |
9 |
exit 1
|
10 |
fi
|
11 |
|
12 |
if [ -w "$MKVFILE" ]; then |
13 |
if TMPFILE=`/bin/mktemp --tmpdir=${MKVFILE%/*}/` ; then |
14 |
if $POSTPROC -q -o $TMPFILE "$MKVFILE" > /dev/null ; then |
15 |
/bin/mv -f $TMPFILE "$MKVFILE" |
16 |
/bin/chmod 666 "$MKVFILE" |
17 |
fi
|
18 |
fi
|
19 |
fi
|