#!/bin/sh

__path=`dirname $0`
bt_read=$__path/../application/bt_read/bt_read
sz=`cat /proc/bts/subbuf_size`
sn=`cat /proc/bts/n_subbufs`

if [ ! -x $bt_read ]; then
	echo "bt_read command not found"
	exit 1
fi
if [ ! -d $1 ]; then
	echo "input directory not found"
	exit 1
fi
if [ ! -d $2 ]; then
	echo "output directory not found"
	exit 1
fi

#rm -rf $2
$bt_read -s $sz -n $sn -i $1 -o $2
