Add v9 sanitization support.
authorDavid Edelsohn <dje.gcc@gmail.com>
Mon, 12 Jul 1993 00:08:42 +0000 (00:08 +0000)
committerDavid Edelsohn <dje.gcc@gmail.com>
Mon, 12 Jul 1993 00:08:42 +0000 (00:08 +0000)
gdb/.Sanitize

index f3cb3cc1638afd7968a064e59167970b9b7ce5bd..b06b7bf255c92d535258013af336acca68d31c99 100644 (file)
@@ -287,4 +287,29 @@ tests
 
 Do-last:
 
+echo Looking for signs of \"v9\"...
+
+# Don't try to clean directories here, as the 'mv' command will fail.
+# Also, grep fails on NFS mounted directories.
+if ( echo $* | grep keep\-v9 > /dev/null ) ; then
+       for i in * ; do
+               if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
+                       echo Keeping v9 stuff in $i
+               fi
+       done
+else
+       for i in * ; do
+               if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
+                       echo Cleaning the \"v9\" out of $i...
+                       cp $i new
+                       sed '/start\-sanitize\-v9/,/end-\sanitize\-v9/d' < $i > new
+                       if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+                               echo Caching $i in .Recover...
+                               mv $i .Recover
+                       fi
+                       mv new $i
+               fi
+       done
+fi
+
 # End of file.