update example
This commit is contained in:
parent
8cc8d412f0
commit
cd04a3dade
2 changed files with 14 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -179,3 +179,4 @@ dmypy.json
|
|||
.pyre/
|
||||
|
||||
# End of https://www.gitignore.io/api/python,emacs
|
||||
with_my
|
||||
|
|
|
@ -1,10 +1,18 @@
|
|||
#!/bin/bash
|
||||
THISDIR="$(dirname "$0")"
|
||||
#!/bin/bash -eu
|
||||
|
||||
# path to my_configuration.py file
|
||||
MY_CONFIGURATION_PATH=
|
||||
|
||||
|
||||
PREV=""
|
||||
if [[ -n $PYTHONPATH ]]; then
|
||||
if [[ -n "${PYTHONPATH:=}" ]]; then
|
||||
PREV=":$PYTHONPATH"
|
||||
else
|
||||
PREV=""
|
||||
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 "$@"
|
||||
|
|
Loading…
Add table
Reference in a new issue