#!/bin/bash source /etc/transogg.conf [ ! -d "$TEMPDIR" ] && mkdir -p "$TEMPDIR" # log errors exec 2> $TEMPDIR/debug-$$.log set -E MyPID=$$ tty=$(who -m|awk '{print $2}') cleanup() { pkill -t $tty find||true unset files export killed=1 } export -f cleanup usage() { cat <<-EOF $0 [-D] [-n ] [-F] [-s ] [-t ] -n : run simultaneous processes (overrides config file) -l : Don't start transcoding if the load average reaches -T