1 # .Sanitize for devo/gas.
3 # Each directory to survive its way into a release will need a file
4 # like this one called "./.Sanitize". All keyword lines must exist,
5 # and must exist in the order specified by this file. Each directory
6 # in the tree will be processed, top down, in the following order.
8 # Hash started lines like this one are comments and will be deleted
9 # before anything else is done. Blank lines will also be squashed
12 # The lines between the "Do-first:" line and the "Things-to-keep:"
13 # line are executed as a /bin/sh shell script before anything else is
14 # done in this directory.
18 # All files listed between the "Things-to-keep:" line and the
19 # "Files-to-sed:" line will be kept. All other files will be removed.
20 # Directories listed in this section will have their own Sanitize
21 # called. Directories not listed will be removed in their entirety
115 arc_files="ChangeLog configure.in configure Makefile.in ChangeLog.1"
116 if ( echo $* | grep keep\-arc > /dev/null ) ; then
117 for i in $arc_files ; do
118 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
119 if [ -n "${verbose}" ] ; then
120 echo Keeping arc stuff in $i
125 for i in $arc_files ; do
126 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
127 if [ -n "${verbose}" ] ; then
128 echo Removing traces of \"arc\" from $i...
131 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
132 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
133 if [ -n "${verbose}" ] ; then
134 echo Caching $i in .Recover...
143 if ( echo $* | grep keep\-gm > /dev/null ) ; then
145 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
146 if [ -n "${verbose}" ] ; then
147 echo Keeping gm stuff in $i
153 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
154 if [ -n "${verbose}" ] ; then
155 echo Removing traces of \"gm\" from $i...
158 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
159 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
160 if [ -n "${verbose}" ] ; then
161 echo Caching $i in .Recover...
171 v850_files="ChangeLog configure.in configure Makefile.in write.c"
172 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
173 for i in $v850_files ; do
174 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
175 if [ -n "${verbose}" ] ; then
176 echo Keeping v850 stuff in $i
181 for i in $v850_files ; do
182 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
183 if [ -n "${verbose}" ] ; then
184 echo Removing traces of \"v850\" from $i...
187 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
188 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
189 if [ -n "${verbose}" ] ; then
190 echo Caching $i in .Recover...
199 r5900_files="ChangeLog"
200 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
201 for i in $r5900_files ; do
202 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
203 if [ -n "${verbose}" ] ; then
204 echo Keeping r5900 stuff in $i
209 for i in $r5900_files ; do
210 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
211 if [ -n "${verbose}" ] ; then
212 echo Removing traces of \"r5900\" from $i...
215 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
216 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
217 if [ -n "${verbose}" ] ; then
218 echo Caching $i in .Recover...
227 tic80_files="ChangeLog configure.in configure"
228 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
229 for i in $tic80_files ; do
230 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
231 if [ -n "${verbose}" ] ; then
232 echo Keeping tic80 stuff in $i
237 for i in $tic80_files ; do
238 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
239 if [ -n "${verbose}" ] ; then
240 echo Removing traces of \"tic80\" from $i...
243 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
244 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
245 if [ -n "${verbose}" ] ; then
246 echo Caching $i in .Recover...
255 d30v_files="ChangeLog configure configure.in"
256 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
257 for i in $d30v_files ; do
258 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
259 if [ -n "${verbose}" ] ; then
260 echo Keeping d30v stuff in $i
265 for i in $d30v_files ; do
266 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
267 if [ -n "${verbose}" ] ; then
268 echo Removing traces of \"d30v\" from $i...
271 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
272 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
273 if [ -n "${verbose}" ] ; then
274 echo Caching $i in .Recover...
284 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
285 echo '***' Some mentions of Sanitize are still left in $i! 1>&2