Contents of my project is like this
C:/{user_name}/my_project/
│ bar.sh
├─scripts/
│ │ bar.sh
│ │
│ └─bar/
│ bar.sh
│
└─src/
foo.py
and Content of all of bar.sh is
python src/foo.py
so if I run from C:/{user_name}/my_project/ directory, bar.sh works.
bash bash.sh
bash scripts/bar.sh
bash scripts/bar/bar.sh
However, after moved to scripts directory, below command does not work because bar.sh tries to find /my_project/sciprts/src/foo.py
bash bar.sh
I understand we can add my_project directory to PYTHONPATH by editing window's envrionmental valiables to solve this. However, I would like to avoid this because {user_name} can be varied and this envrionmental is shared by many guys.
Therefore I am looking for a good way to add my_project directory to PYTHONPATH by adding same line(s) to bar.sh. Do you know such a magic command?