From 1e75b7b01502c0660c419ea6cadb92d86cac354d Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Fri, 11 Aug 2006 21:53:27 +0000 Subject: Make llvmdo and llvmgrep invulnerable to where they are run from by getting the llvm source root from the llvm-config command. The dependency now is that the correct llvm-config command is in the path. For most developers this is the case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29630 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/llvmgrep | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'utils/llvmgrep') diff --git a/utils/llvmgrep b/utils/llvmgrep index e5a08ad..d4369c7 100755 --- a/utils/llvmgrep +++ b/utils/llvmgrep @@ -18,8 +18,7 @@ # details. ##===----------------------------------------------------------------------===## -TOPDIR=`pwd | sed -e 's#\(.*/llvm[0-9]*\).*#\1#'` -echo $TOPDIR +TOPDIR=`llvm-config --src-root` if test -d "$TOPDIR" ; then cd $TOPDIR case `uname -s` in -- cgit v1.1