-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6391 from jamiesnape/drake-visualizer-mac
Let drake_visualizer work outside sandbox on Mac
- Loading branch information
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# If we are outside the sandbox, then change to the same relative directory as | ||
# we would be inside the sandbox. | ||
if ! [ -d "external/director" ]; then | ||
guess_runfiles=$(dirname "$0")/drake_visualizer.runfiles/drake | ||
if [ -d "$guess_runfiles/external/director" ]; then | ||
cd "$guess_runfiles" | ||
else | ||
echo "$(basename $0) error: could not find director" 1>&2 | ||
exit 1 | ||
fi | ||
fi | ||
|
||
export DYLD_LIBRARY_PATH="external/director/lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}" | ||
# TODO(jamiesnape): Do not hard code absolute path to [email protected]. | ||
export PYTHONPATH="external/director/lib/python2.7/dist-packages:/usr/local/opt/[email protected]/lib/python2.7/site-packages${PYTHONPATH:+:$PYTHONPATH}" | ||
|