build 542 B

1234567891011121314
  1. #!/usr/bin/env bash
  2. #python `dirname $0`/RunToolFromSource.py `basename $0` $*
  3. # If a ${PYTHON_COMMAND} command is available, use it in preference to python
  4. if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
  5. python_exe=${PYTHON_COMMAND}
  6. fi
  7. full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
  8. dir=$(dirname "$full_cmd")
  9. cmd=${full_cmd##*/}
  10. export PYTHONPATH="$dir/../../Source/Python"
  11. exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@"