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

Reid Spencer reid at x10sys.com
Thu Oct 7 09:03:31 PDT 2004



Changes in directory llvm/utils:

llvmdo updated: 1.5 -> 1.6
llvmgrep updated: 1.7 -> 1.8
---
Log message:

Make these scripts work on SunOS too.


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

Index: llvm/utils/llvmdo
diff -u llvm/utils/llvmdo:1.5 llvm/utils/llvmdo:1.6
--- llvm/utils/llvmdo:1.5	Mon Sep 20 03:04:13 2004
+++ llvm/utils/llvmdo	Thu Oct  7 11:03:21 2004
@@ -47,7 +47,11 @@
 TOPDIR=`pwd | sed -e 's#\(.*/llvm\).*#\1#'`
 if test -d "$TOPDIR" ; then
   cd $TOPDIR
-  find $LLVMDO_DIRS -type f \
+  case `uname -s` in
+    SunOS) find_prog=gfind ;;
+    *) find_prog=find ;;
+  esac
+  $find_prog $LLVMDO_DIRS -type f \
     \( \
       -path 'docs/doxygen/*' -o \
       -path 'docs/CommandGuide/html/*' -o \


Index: llvm/utils/llvmgrep
diff -u llvm/utils/llvmgrep:1.7 llvm/utils/llvmgrep:1.8
--- llvm/utils/llvmgrep:1.7	Mon Sep 20 03:09:36 2004
+++ llvm/utils/llvmgrep	Thu Oct  7 11:03:21 2004
@@ -21,7 +21,12 @@
 TOPDIR=`pwd | sed -e 's#\(.*/llvm\).*#\1#'`
 if test -d "$TOPDIR" ; then
   cd $TOPDIR
-  ./utils/llvmdo -dirs "include lib tools utils docs examples test projects" egrep -H -n "$*"
+  case `uname -s` in
+    SunOS) grep_cmd="ggrep -H -n" ;;
+    Linux) grep_cmd="egrep -H -n" ;;
+    *) grep_cmd="egrep -l -n" ;;
+  esac
+  ./utils/llvmdo -dirs "include lib tools utils docs examples test projects" $grep_cmd "$*"
 else
   echo "Can't find LLVM top directory in $TOPDIR"
 fi






More information about the llvm-commits mailing list