This script takes arguments so remove the check for number of arguments,
authorReid Spencer <rspencer@reidspencer.com>
Tue, 15 Aug 2006 03:48:22 +0000 (03:48 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Tue, 15 Aug 2006 03:48:22 +0000 (03:48 +0000)
just check the first arg to see if its -topdir.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29694 91177308-0d34-0410-b5e6-96231b3b80d8

utils/llvmgrep

index 0b6bdf35b02916ffb59e86a5d9a1c53fd9d9284d..c24dc6f3ab6a59ba74b3b774ead07a1054f57980 100755 (executable)
 # details.
 ##===----------------------------------------------------------------------===##
 
-if test $# -gt 1 ; then
-  if test "$1" = "-topdir" ; then
-    TOPDIR="$2"
-    shift; shift;
-  else
-    TOPDIR=`llvm-config --src-root`
-  fi
+if test "$1" = "-topdir" ; then
+  TOPDIR="$2"
+  shift; shift;
+else
+  TOPDIR=`llvm-config --src-root`
 fi
 
 if test -d "$TOPDIR" ; then