#!/bin/bash

GENERAL_RELEASE=$(echo $(uname -r) | sed "s/\(.*\)-\(.*\)-\(.*\)/\1-\2/g")
TOOL="/usr/lib/linux-tools-$GENERAL_RELEASE/$(basename $0)"

if [ -f $TOOL ]; then
	exec $TOOL "$@"
fi

echo "Binary file $(basename $0) for kernel version $GENERAL_RELEASE not found!" 1>&2
echo "You need to install linux-tools-$GENERAL_RELEASE package" 1>&2
exit 1
