Edit out GM-specific bits from files.
authorStan Shebs <shebs@codesourcery.com>
Sun, 3 Dec 1995 22:11:25 +0000 (22:11 +0000)
committerStan Shebs <shebs@codesourcery.com>
Sun, 3 Dec 1995 22:11:25 +0000 (22:11 +0000)
gas/.Sanitize

index b36fb2de7ba90dd65f2e878ef09c6d6f7f0f2279..edaefc7de8f34260e5b293627bdf10070d525e95 100644 (file)
@@ -212,6 +212,33 @@ else
        done
 fi
 
+if ( echo $* | grep keep\-gm > /dev/null ) ; then
+       for i in * ; do
+               if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping gm stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in * ; do
+               if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"gm\" from $i...
+                       fi
+                       cp $i new
+                       sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
+                       if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+                               if [ -n "${verbose}" ] ; then
+                                       echo Caching $i in .Recover...
+                               fi
+                               mv $i .Recover
+                       fi
+                       mv new $i
+               fi
+       done
+fi
+
 for i in * ; do
        if test ! -d $i && (grep sanitize $i > /dev/null) ; then
                echo '***' Some mentions of Sanitize are still left in $i! 1>&2