From: Reid Spencer Date: Fri, 11 Aug 2006 21:55:31 +0000 (+0000) Subject: Make this script not care where it is run from by getting the llvm src X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=8312657fc39b82e3e7ec61e1dd9aef9515dede52;p=oota-llvm.git Make this script not care where it is run from by getting the llvm src root from the llvm-config script. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29632 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/countloc.sh b/utils/countloc.sh index fe77de91846..736b8805df6 100755 --- a/utils/countloc.sh +++ b/utils/countloc.sh @@ -19,7 +19,7 @@ # details. ##===----------------------------------------------------------------------===## -TOPDIR=`pwd | sed -e 's#\(.*/llvm\).*#\1#'` +TOPDIR=`llvm-config --src-root` if test -d "$TOPDIR" ; then cd $TOPDIR ./utils/llvmdo -dirs "include lib tools test utils examples" wc -l | awk '\