summaryrefslogtreecommitdiffstats
path: root/llvm/utils/llvmgrep
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-03-14 06:08:05 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-03-14 06:08:05 +0000
commit3e2d463a872cb35a5c6eb2066a4b4eaab4bae555 (patch)
treef6e76fb735d66cc9f5b94829e8f528790d1163d1 /llvm/utils/llvmgrep
parent552aa01d1255764c437e3f058666737bfb5be571 (diff)
downloadbcm5719-llvm-3e2d463a872cb35a5c6eb2066a4b4eaab4bae555.tar.gz
bcm5719-llvm-3e2d463a872cb35a5c6eb2066a4b4eaab4bae555.zip
Allow a sequence of digits at the end of the directory name when trying to
determine the top directory. This allows the tool to find the correct top directory when you have something like: /x/llvm /x/llvm2 /x/llvm3 Previously the scripts would always find /x/llvm even if you were in the llvm2 or llvm3 directory because the pattern didn't allow the digits at the end of the path. llvm-svn: 26751
Diffstat (limited to 'llvm/utils/llvmgrep')
-rwxr-xr-xllvm/utils/llvmgrep3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/utils/llvmgrep b/llvm/utils/llvmgrep
index a1f77636c4f..e5a08ad0051 100755
--- a/llvm/utils/llvmgrep
+++ b/llvm/utils/llvmgrep
@@ -18,7 +18,8 @@
# details.
##===----------------------------------------------------------------------===##
-TOPDIR=`pwd | sed -e 's#\(.*/llvm\).*#\1#'`
+TOPDIR=`pwd | sed -e 's#\(.*/llvm[0-9]*\).*#\1#'`
+echo $TOPDIR
if test -d "$TOPDIR" ; then
cd $TOPDIR
case `uname -s` in
OpenPOWER on IntegriCloud