[cmucl-commit] CMUCL commit: cross-sol-x86-branch src/tools (clean-target.sh)

Raymond Toy rtoy at common-lisp.net
Tue Dec 21 05:35:57 CET 2010


    Date: Monday, December 20, 2010 @ 23:35:57
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/tools
     Tag: cross-sol-x86-branch

Modified: clean-target.sh

o Use egrep instead of grep.  It's a bit more portable, and the stock
  egrep on Solaris/x86 will do what we want.
o Split GREP into separate GREP variable and PATTERN variable.
o Adjust grep pattern to egrep form.


-----------------+
 clean-target.sh |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)


Index: src/tools/clean-target.sh
diff -u src/tools/clean-target.sh:1.9 src/tools/clean-target.sh:1.9.8.1
--- src/tools/clean-target.sh:1.9	Mon May 10 15:30:40 2010
+++ src/tools/clean-target.sh	Mon Dec 20 23:35:57 2010
@@ -46,11 +46,14 @@
 GREP="cat"
 CORE='-o -name "*.core"'
 
+set -x
 if [ -n "$KEEP" ]; then
     case $KEEP in
-      lib) GREP='grep -v \(gray-streams\|gray-compat\|simple-streams\|iodefs\|external-formats\|clx\|hemlock\|clm\)-library' ;;
+      lib) GREP='egrep -v'
+	   PATTERN='(gray-streams|gray-compat|simple-streams|iodefs|external-formats|clx|hemlock|clm)-library' ;;
       core) CORE='' ;;
-      all) GREP='grep -v \(gray-streams\|gray-compat\|simple-streams\|iodefs\|external-formats\|clx\|hemlock\|clm\)-library\|\(asdf\|defsystem\)'
+      all) GREP='egrep -v'
+	   PATTERN='(gray-streams|gray-compat|simple-streams|iodefs|external-formats|clx|hemlock|clm)-library|(asdf|defsystem)'
 	   CORE='' ;;
     esac
 fi
@@ -63,7 +66,7 @@
 	-name "*.ppcf" -o \
 	-name "*.sparcf" -o \
 	-name "*.x86f" -o \
-	-name "*.sse2f" $CORE | $GREP | xargs rm 2> /dev/null
+	-name "*.sse2f" $CORE | $GREP $PATTERN | xargs rm 2> /dev/null
 
 for d in $TARGET
 do


More information about the cmucl-commit mailing list