diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-03-14 06:08:05 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-03-14 06:08:05 +0000 |
commit | 09a053a777056ea3e246a6b2fc3df139c6dff9f1 (patch) | |
tree | b09b121413c94b2e4ea24e7a1ad3e5aed2709148 /utils/llvmgrep | |
parent | b7b83173888f94d9629e8c4df4e7fddd325d0600 (diff) | |
download | external_llvm-09a053a777056ea3e246a6b2fc3df139c6dff9f1.zip external_llvm-09a053a777056ea3e246a6b2fc3df139c6dff9f1.tar.gz external_llvm-09a053a777056ea3e246a6b2fc3df139c6dff9f1.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/llvmgrep')
-rwxr-xr-x | utils/llvmgrep | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/llvmgrep b/utils/llvmgrep index a1f7763..e5a08ad 100755 --- a/utils/llvmgrep +++ b/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 |