#!/usr/bin/bash
# -*- mode: shell-script; indent-tabs-mode: t; sh-basic-offset: 8; sh-indentation: 8; tab-width: 8 -*-

PROG="$(basename ${0})"

script="${1}"
if [[ -z "${script}" ]]; then
	printf "%s: missing required 'script' argument\n" "${PROG}" >&2
	exit 1
fi

command -v bpftrace > /dev/null
if [[ ${?} -ne 0 ]]; then
	printf "%s: missing required 'bpftrace' command\n" "${PROG}" >&2
	exit 1
fi

exec bpftrace "${script}"
