Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSTYPE environmental variable in ORCA/deps/bin #228

Closed
BoundaryValueProblems opened this issue Sep 22, 2018 · 1 comment
Closed

OSTYPE environmental variable in ORCA/deps/bin #228

BoundaryValueProblems opened this issue Sep 22, 2018 · 1 comment

Comments

@BoundaryValueProblems
Copy link

@sglyon , when I installed ORCA on my MacBook Pro (OS X 10.11.6), and ran using ORCA for PlotlyJS, it complained:

/Users/xxx/.julia/packages/ORCA/vWe2Y/deps/bin/orca: line 7: /Users/xxx/.julia/packages/ORCA/vWe2Y/deps/lib/orca_app/orca: No such file or directory
/Users/xxx/.julia/packages/ORCA/vWe2Y/deps/bin/orca: line 7: exec: /Users/xxx/.julia/packages/ORCA/vWe2Y/deps/lib/orca_app/orca: cannot execute: No such file or directory

So, I took a look at deps/bin/orga:

#!/bin/bash
if [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
exec /Users/xxx/.julia/packages/ORCA/vWe2Y/deps/lib/orca.app/Contents/MacOS/orca "$@"
else
# Assume linux
exec /Users/xxx/.julia/packages/ORCA/vWe2Y/deps/lib/orca_app/orca "$@"
fi

Since in my ~/.bashrc, I define export OSTYPE=`uname` , on my MacBook Pro, the value of OSTYPE is Darwin, not darwin. Of couse, I could suppress that line in my ~/.bashrc, but in general, we never know what each user handles the OSTYPE variable, it would be a bit risky to just judge if "$OSTYPE" == "darwin"*, in my opinion. Perhaps, at least, we should check whether [[ "$OSTYPE" == "darwin"* ] || [ "$OSTYPE" == "Darwin"* ]]. (Perhaps, there is a better way to check a word with a case insensitive way in bash...)

@BoundaryValueProblems
Copy link
Author

According to @sglyon , this issue should be discussed at ploly/orca; see: plotly/orca#132.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant