File: goby-python-with-path.sh

package info (click to toggle)
libgoby-java 3.3.1%2Bdfsg2-11
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 58,108 kB
  • sloc: java: 78,105; cpp: 5,011; xml: 3,170; python: 2,108; sh: 1,575; ansic: 277; makefile: 114
file content (9 lines) | stat: -rwxr-xr-x 317 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env bash
if [ "$#" -lt 1 ]; then
    echo "Need at least one parameter, path to python file rooted at GOBY_DIR/python; arguments after should be arguments to script"
    exit 1
fi
export PYTHONPATH=${GOBY_DIR}/python:${PYTHONPATH}
python_script=${GOBY_DIR}/python/"$1"
shift
python3 "${python_script}" "$@"