1 # Sanitize.in for devo/include/elf.
3 # Each directory to survive it's 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
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
56 sky_files="ChangeLog mips.h"
57 if ( echo $* | grep keep\-sky > /dev/null ) ; then
58 for i in $sky_files ; do
59 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
60 if [ -n "${verbose}" ] ; then
61 echo Keeping sky stuff in $i
66 for i in $sky_files ; do
67 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
68 if [ -n "${verbose}" ] ; then
69 echo Removing traces of \"sky\" from $i...
72 sed '/start\-sanitize\-sky/,/end\-sanitize\-sky/d' < $i > new
73 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
74 if [ -n "${verbose}" ] ; then
75 echo Caching $i in .Recover...
85 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
86 for i in $vr4320_files ; do
87 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
88 if [ -n "${verbose}" ] ; then
89 echo Keeping vr4320 stuff in $i
94 for i in $vr4320_files ; do
95 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
96 if [ -n "${verbose}" ] ; then
97 echo Removing traces of \"vr4320\" from $i...
100 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
101 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
102 if [ -n "${verbose}" ] ; then
103 echo Caching $i in .Recover...
112 vr4xxx_files="ChangeLog mips.h"
113 if ( echo $* | grep keep\-vr4xxx > /dev/null ) ; then
114 for i in $vr4xxx_files ; do
115 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
116 if [ -n "${verbose}" ] ; then
117 echo Keeping vr4xxx stuff in $i
122 for i in $vr4xxx_files ; do
123 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
124 if [ -n "${verbose}" ] ; then
125 echo Removing traces of \"vr4xxx\" from $i...
128 sed '/start\-sanitize\-vr4xxx/,/end-\sanitize\-vr4xxx/d' < $i > new
129 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
130 if [ -n "${verbose}" ] ; then
131 echo Caching $i in .Recover...
141 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
142 for i in $tx49_files ; do
143 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
144 if [ -n "${verbose}" ] ; then
145 echo Keeping tx49 stuff in $i
150 for i in $tx49_files ; do
151 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
152 if [ -n "${verbose}" ] ; then
153 echo Removing traces of \"tx49\" from $i...
156 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
157 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
158 if [ -n "${verbose}" ] ; then
159 echo Caching $i in .Recover...
168 cygnus_files="mips.h mn10300.h ChangeLog m32r.h"
169 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
170 for i in $cygnus_files ; do
171 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
172 if [ -n "${verbose}" ] ; then
173 echo Keeping cygnus stuff in $i
178 for i in $cygnus_files ; do
179 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
180 if [ -n "${verbose}" ] ; then
181 echo Removing traces of \"cygnus\" from $i...
184 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
185 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
186 if [ -n "${verbose}" ] ; then
187 echo Caching $i in .Recover...
196 r5900_files="mips.h ChangeLog"
197 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
198 for i in $r5900_files ; do
199 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
200 if [ -n "${verbose}" ] ; then
201 echo Keeping r5900 stuff in $i
206 for i in $r5900_files ; do
207 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
208 if [ -n "${verbose}" ] ; then
209 echo Removing traces of \"r5900\" from $i...
212 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
213 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
214 if [ -n "${verbose}" ] ; then
215 echo Caching $i in .Recover...
225 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
226 echo '***' Some mentions of Sanitize are still left in $i! 1>&2