diff options
author | makaimann <makaim@stanford.edu> | 2019-08-01 17:52:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-01 17:52:37 -0700 |
commit | b94f38055fbe8ab975fc8c204843f58670eb8320 (patch) | |
tree | 663ac98d8c7f70337e29e88e7dd713498527f75d /contrib | |
parent | 08c1ed76932102948bca5157a5da64033ea1c408 (diff) |
Use python realpath instead of relying on shell realpath (#3117)
* Use a custom implementation instead of relying on realpath, because it doesn't exist on Mac
* Use local variables and move portable_realpath to its own file
* Replace portable_realpath with python realpath
* Consistent command substitution
Co-Authored-By: Andres Noetzli <andres.noetzli@gmail.com>
* Substitute pwd directly
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/get-antlr-3.4 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/get-antlr-3.4 b/contrib/get-antlr-3.4 index 670fc3b41..6bfa18c46 100755 --- a/contrib/get-antlr-3.4 +++ b/contrib/get-antlr-3.4 @@ -46,7 +46,7 @@ cd libantlr3c-3.4 # Use an absolute path for the installation directory to avoid spurious libtool # warnings about the ANTLR library having moved -PREFIX=$(realpath `pwd`/../..) +PREFIX=$(python -c "import os; print(os.path.realpath('$(pwd)/../..'))") # Make antlr3debughandlers.c empty to avoid unreferenced symbols rm -rf src/antlr3debughandlers.c && touch src/antlr3debughandlers.c |