1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

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
This commit is contained in:
Reid Spencer 2006-03-14 06:08:05 +00:00
parent 5fedc2d492
commit a11dd3baf9
2 changed files with 3 additions and 2 deletions

View File

@ -43,7 +43,7 @@ if test ! -x "$PROGRAM" ; then
exit 1
fi
shift;
TOPDIR=`pwd | sed -e 's#\(.*/llvm\).*#\1#'`
TOPDIR=`pwd | sed -e 's#\(.*/llvm[0-9]*\).*#\1#'`
if test -d "$TOPDIR" ; then
cd $TOPDIR
case `uname -s` in

View File

@ -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