openvino/scripts/setupvars
oogee c76b5f2776
Use shell parameter expansion to make getting source path work in non-bash shells (#24598)
Currently `BASH_SOURCE[0]` was used, which is only available on bash.

I changed it to `${BASH_SOURCE:-$0}` which is supported by at least
bash, zsh and dash, as explained by
[https://stackoverflow.com/a/68359914/9028340](https://stackoverflow.com/a/68359914/9028340)

It uses shell parameter expansion

https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html

https://zsh.sourceforge.io/Doc/Release/Expansion.html#Parameter-Expansion

Addresses #17392
2024-05-21 15:28:52 +00:00
..
setupvars.bat copyright year update (#23370) 2024-03-14 09:37:02 +00:00
setupvars.ps1 [SCRIPTS] Introduce `setupvars` for Powershell (#22013) 2024-01-11 10:29:32 +04:00
setupvars.sh Use shell parameter expansion to make getting source path work in non-bash shells (#24598) 2024-05-21 15:28:52 +00:00