sbsv2/raptor/bin/sbs_filter
author lorewang
Wed, 01 Dec 2010 16:05:36 +0800
changeset 715 e0739b8406dd
parent 674 37ee82a83d43
permissions -rw-r--r--
Specify extenal tool with path

#!/bin/bash
# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of the License "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
# Contributors:
#
# Description:
# raptor filter script
# add mingw to the PATH if we are running Cygwin on Windows
#

# If SBS_HOME is not set in the environment then work it out
# from the path to this script
if [ -z "$SBS_HOME" ] ; then
	temp=$0
	SBS_HOME=$(cd ${temp%/*} && echo $PWD)
	export SBS_HOME
fi

# Call sbs_env script
source $SBS_HOME/bin/sbs_env

# call sbs_filter.py with the arguments

FILTER_START="$SBS_HOME/bin/sbs_filter.py"

if [ -e "$FILTER_START" ]; then
	# run the source version
	${__PYTHON__} "$FILTER_START" "$@"
elif [ -e "$FILTER_START"c ]; then
	# run the compiled version
	${__PYTHON__} "$FILTER_START"c "$@"
else
	echo "Cannot start sbs_filter - $FILTER_START not found." 1>&2
	echo "Check your SBS_HOME environment variable." 1>&2
fi