#!/bin/bash -p

# **********************************************************************
# Copyright (c) Ericsson AB 2017-2019 All rights reserved.
#
# The information in this document is the property of Ericsson.
#
# Except as specifically authorized in writing by Ericsson, the
# receiver of this document shall keep the information contained
# herein confidential and shall protect the same in whole or in
# part from disclosure and dissemination to third parties.
#
# Disclosure and disseminations to the receivers employees shall
# only be made on a strict need to know basis.
#
# **********************************************************************
#
# Rev        Date        Name        What
# -----      -------     --------    --------------------------
# 1.0        2017-09-26  eanzmagn    Created
#
# **********************************************************************
#

moshelldir=`dirname "$0"`
if [[ $moshelldir != /* ]] ; then moshelldir=`pwd`/$moshelldir ; fi
vobsinstallation=0
unamea=$(uname -a)
gawkext=""
if [[ $unamea = [Ll][iI][nN][uU][xX]* && $unamea = *x86_64* ]] ; then gawkext=".lin64"
elif [[ $unamea = [Ll][iI][nN][uU][xX]* && $vobsinstallation = 1 ]] ; then gawkext=".linux"
elif [[ $unamea = SunOS* && $vobsinstallation = 1 ]] ; then gawkext=".sol86"
fi

babeltrace="$moshelldir/commonjars/babeltrace${gawkext}"


$babeltrace "$@" 2>&1


