- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just reporting a modification required to the initial scrip to be able to run without issue.
Current the script called setupvars.sh released with OpenVino 2018.2.319 has the following shebang: #!/bin/sh
It produces the following error when executed from .profile:
~$ source .profile
./setupvars.sh: 30: ./setupvars.sh: [[: not found
./setupvars.sh: 36: ./setupvars.sh: [[: not found
./setupvars.sh: 62: ./setupvars.sh: [[: not found
./setupvars.sh: 66: ./setupvars.sh: [[: not found
[setupvars.sh] OpenVINO environment initialized
Modification of the shebang as follow fixes the problem: #!/bin/bash
The result is:
source .profile
[setupvars.sh] OpenVINO environment initialized
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Michael,
Thanks for your feedback on this. We don't currently have documentation on how to update the shell initialization scripts such as .profile on Linux but it'll add this as a request since this makes it easier to not have to source the setupvar.sh every time you open a new terminal.
Kind Regards,
Monique Jones
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
IMO, a superior solution to the issue described is to keep the shebang as-is, while getting rid of those unnecessary bashisms. For this script, there is no need not to be POSIX compatible. I guess something like the changes found in this diff would do the trick:
< while [[ $# -gt 0 ]] --- > while [ $# -gt 0 ] 45c45 < if [[ -f /etc/os-release ]]; then --- > if [ -f /etc/os-release ]; then 55c55 < if [[ -e ${IE_PLUGINS_PATH}/arch_descriptions ]]; then --- > if [ -e ${IE_PLUGINS_PATH}/arch_descriptions ]; then 60c60 < if [[ "$OSTYPE" == "darwin"* ]]; then --- > if [ "$OSTYPE" = "darwin"* ]; then 70c70 < source "$INSTALLDIR/opencv/setupvars.sh" --- > . "$INSTALLDIR/opencv/setupvars.sh"
BR,
/J

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page