summaryrefslogtreecommitdiff
path: root/utils/countloc.sh
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-08-11 21:55:31 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-08-11 21:55:31 +0000
commit8312657fc39b82e3e7ec61e1dd9aef9515dede52 (patch)
tree641bec1d666055b6c74738b41d6a6be93d2028fa /utils/countloc.sh
parentc9f8f416800784ca6453222b307bc44ad24739b0 (diff)
downloadllvm-8312657fc39b82e3e7ec61e1dd9aef9515dede52.tar.gz
llvm-8312657fc39b82e3e7ec61e1dd9aef9515dede52.tar.bz2
llvm-8312657fc39b82e3e7ec61e1dd9aef9515dede52.tar.xz
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
Diffstat (limited to 'utils/countloc.sh')
-rwxr-xr-xutils/countloc.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/countloc.sh b/utils/countloc.sh
index fe77de9184..736b8805df 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 '\