diff options
author | Josh Gao <jmgao@google.com> | 2015-10-13 17:02:07 -0700 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2015-10-13 17:02:07 -0700 |
commit | ba1cb2b1ec5d1b85f4218fd0d4ac013c72834aa9 (patch) | |
tree | 7ba5957abcb5562511e106e02794d2ca4709bb79 | |
parent | c9f9f54d36124448cf18d57923ec801ca84478b5 (diff) | |
download | gdb-ba1cb2b1ec5d1b85f4218fd0d4ac013c72834aa9.tar.gz |
Don't use readlink to find gdb's location.
readlink isn't in POSIX, and the one available in on OS X does not
support the -f option. Use $(cd $(dirname $0) && pwd) instead.
Bug: http://b/24776250
Change-Id: Ia3b42b4cecd0b39d4dd5af15b2afe9bb1da6893a
-rwxr-xr-x | build-gdb.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/build-gdb.sh b/build-gdb.sh index 79286b845..e64cece9a 100755 --- a/build-gdb.sh +++ b/build-gdb.sh @@ -276,7 +276,7 @@ install_host_gdb () mv "$GDB_PATH" "$GDB_PATH"-orig cat > "$GDB_PATH" << EOF #!/bin/bash -GDBDIR=\$(dirname \$(readlink -f \$0)) +GDBDIR=\$(cd \$(dirname \$0) && pwd) PYTHONHOME="\$GDBDIR/.." "\$GDBDIR/gdb-orig" "\$@" EOF chmod 755 $GDB_PATH |