[llvm-commits] CVS: llvm/utils/llvmgrep

LLVM llvm at cs.uiuc.edu
Wed Jul 7 16:20:01 PDT 2004


Changes in directory llvm/utils:

llvmgrep updated: 1.1 -> 1.2

---
Log message:

Fix some thinkos in the script (error handling, proper argument handling).


---
Diffs of the changes:  (+4 -2)

Index: llvm/utils/llvmgrep
diff -u llvm/utils/llvmgrep:1.1 llvm/utils/llvmgrep:1.2
--- llvm/utils/llvmgrep:1.1	Sat Jun 19 15:32:55 2004
+++ llvm/utils/llvmgrep	Wed Jul  7 16:19:01 2004
@@ -1,7 +1,7 @@
 #!/bin/sh
 # This is useful because it prints out all of the source files.  Useful for
 # greps.
-PATTERN=$*
+PATTERN="$*"
 TOPDIR=`pwd | sed -e 's#(.*/llvm).*#$1#'`
 if test -d "$TOPDIR" ; then
   cd $TOPDIR
@@ -18,5 +18,7 @@
       \! -name 'llvmAsmParser.h' \
       \! -name 'FileParser.cpp' \
       \! -name 'FileParser.h' \
-      -exec egrep -H -n $PATTERN {} \;
+      -exec egrep -H -n "$PATTERN" {} \;
+else
+  echo "Can't find LLVM top directory in $TOPDIR"
 fi





More information about the llvm-commits mailing list