update example

This commit is contained in:
Dima Gerasimov 2019-09-17 22:02:13 +04:00
parent 8cc8d412f0
commit cd04a3dade
2 changed files with 14 additions and 5 deletions

1
.gitignore vendored
View file

@ -179,3 +179,4 @@ dmypy.json
.pyre/ .pyre/
# End of https://www.gitignore.io/api/python,emacs # End of https://www.gitignore.io/api/python,emacs
with_my

View file

@ -1,10 +1,18 @@
#!/bin/bash #!/bin/bash -eu
THISDIR="$(dirname "$0")"
# path to my_configuration.py file
MY_CONFIGURATION_PATH=
PREV="" if [[ -n "${PYTHONPATH:=}" ]]; then
if [[ -n $PYTHONPATH ]]; then
PREV=":$PYTHONPATH" PREV=":$PYTHONPATH"
else
PREV=""
fi fi
export PYTHONPATH="$THISDIR$PREV"
MY_DIR="$(dirname "$0")"
MY_CONFIGURATION_DIR="$(dirname "$MY_CONFIGURATION_PATH")"
export PYTHONPATH="$MY_CONFIGURATION_DIR:$MY_DIR""$PREV"
echo "$PYTHONPATH"
exec "$@" exec "$@"