| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| script_dir="$(dirname "${BASH_SOURCE[@]}")" |
| current_dir="$(pwd)" |
| pathdir="$(python -c "import os.path; print(os.path.abspath(os.path.join('$current_dir', '$script_dir')))")" |
| newpath="$pathdir" |
| |
| # If the path is already set, append to it. |
| if [ "x$PYTHONPATH" != "x" ]; then |
| newpath="$newpath:$PYTHONPATH" |
| fi |
| |
| echo "$newpath" |
| export PYTHONPATH="$newpath" |
| |