From ba1cb2b1ec5d1b85f4218fd0d4ac013c72834aa9 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Tue, 13 Oct 2015 17:02:07 -0700 Subject: 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 --- build-gdb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3