sbs_filter 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/bash
  2. # Copyright (c) 2007-2011 Nokia Corporation and/or its subsidiary(-ies).
  3. # All rights reserved.
  4. # This component and the accompanying materials are made available
  5. # under the terms of the License "Eclipse Public License v1.0"
  6. # which accompanies this distribution, and is available
  7. # at the URL "http://www.eclipse.org/legal/epl-v10.html".
  8. #
  9. # Initial Contributors:
  10. # Nokia Corporation - initial contribution.
  11. #
  12. # Contributors:
  13. #
  14. # Description:
  15. # raptor filter script
  16. # add mingw to the PATH if we are running Cygwin on Windows
  17. #
  18. if [ "$OSTYPE" == "cygwin" ]; then
  19. SBS_HOME=$(/bin/cygpath.exe -a -m "$0/../..")
  20. else
  21. SBS_HOME=$(cd "${0%/*}/.." && echo $PWD)
  22. fi
  23. source $SBS_HOME/bin/sbs_env
  24. export SBS_HOME
  25. # call sbs_filter.py with the arguments
  26. FILTER_START="$SBS_HOME/bin/sbs_filter.py"
  27. if [ -e "$FILTER_START" ]; then
  28. # run the source version
  29. ${__PYTHON__} "$FILTER_START" "$@"
  30. elif [ -e "$FILTER_START"c ]; then
  31. # run the compiled version
  32. ${__PYTHON__} "$FILTER_START"c "$@"
  33. else
  34. echo "Cannot start sbs_filter - $FILTER_START not found." 1>&2
  35. echo "Check your SBS_HOME environment variable." 1>&2
  36. fi