Commit | Line | Data |
---|---|---|
43e36dd2 | 1 | # .Sanitize for devo. |
a93b3c77 RP |
2 | |
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. | |
7 | ||
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 | |
10 | # out. | |
11 | ||
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 | |
43e36dd2 | 14 | # done in this directory. |
a93b3c77 RP |
15 | |
16 | Do-first: | |
17 | ||
7d0eab7b | 18 | if ( echo $* | grep keep\-cygnus > /dev/null) ; then |
d19050d4 | 19 | keep_these_too="${keep_these_too} release release-info build-all.mk" |
80cad9cc | 20 | else |
d19050d4 | 21 | lose_these_too="${lose_these_too} release release-info build-all.mk" |
7d0eab7b DZ |
22 | fi |
23 | ||
24 | ||
a93b3c77 | 25 | # All files listed between the "Things-to-keep:" line and the |
43e36dd2 | 26 | # "Do-last:" line will be kept. All other files will be removed. |
a93b3c77 RP |
27 | # Directories listed in this section will have their own Sanitize |
28 | # called. Directories not listed will be removed in their entirety | |
29 | # with rm -rf. | |
30 | ||
31 | Things-to-keep: | |
32 | ||
c9b36b5f | 33 | .cvsignore |
6e37b215 PB |
34 | COPYING |
35 | COPYING.LIB | |
6227a92b | 36 | CYGNUS |
57d32184 | 37 | ChangeLog |
a93b3c77 | 38 | Makefile.in |
965a9f14 | 39 | README |
28f760d3 | 40 | autoconf |
d5eb68fa | 41 | bfd |
ebec4684 | 42 | binutils |
6a2d7603 | 43 | byacc |
a93b3c77 | 44 | config |
5cc24596 | 45 | config.guess |
db2de419 | 46 | config.sub |
a93b3c77 | 47 | configure |
e72c4b3a | 48 | configure.bat |
a93b3c77 | 49 | configure.in |
cdabe523 | 50 | cvs |
8ec1b2a1 | 51 | deja-gnu |
d623fd7e | 52 | dejagnu |
5781b1ba | 53 | diff |
4e0c2de7 | 54 | dvips |
cdabe523 | 55 | emacs |
701df845 | 56 | etc |
17519312 | 57 | expect |
4e0c2de7 | 58 | fileutils |
49df2308 | 59 | flex |
a93b3c77 | 60 | gas |
ebec4684 RP |
61 | gcc |
62 | gdb | |
f3d3d2cd | 63 | gdbm |
e72c4b3a | 64 | gdbtest |
f7f4df6a | 65 | glob |
9a14a29d | 66 | gprof |
5781b1ba | 67 | grep |
4e0c2de7 | 68 | groff |
a93b3c77 | 69 | include |
4a01dc52 | 70 | install.sh |
2dbd15d2 | 71 | ispell |
ebec4684 | 72 | ld |
0862386b | 73 | libg++ |
e72c4b3a RP |
74 | libgcc |
75 | libiberty | |
7c4dd2c8 | 76 | libio |
4e0c2de7 | 77 | m4 |
cdabe523 | 78 | make |
d592622a | 79 | mmalloc |
e72c4b3a | 80 | move-if-change |
6ae8fff5 | 81 | newlib |
aa06ff7e | 82 | opcodes |
ba8acf46 | 83 | pagas |
57d32184 | 84 | patch |
d42563da | 85 | prms |
3c8735af | 86 | rcs |
a93b3c77 | 87 | readline |
4e0c2de7 | 88 | sed |
00d8b290 | 89 | send-pr |
4e0c2de7 | 90 | shellutils |
da7e4b5c | 91 | sim |
17519312 | 92 | tcl |
4e0c2de7 DZ |
93 | textutils |
94 | tk | |
c9b36b5f | 95 | test-build.mk |
d239963b | 96 | texinfo |
14bed8ee | 97 | tgas |
ba8acf46 | 98 | utils |
fa64be8d | 99 | uudecode |
4e0c2de7 DZ |
100 | wdiff |
101 | xiberty | |
a93b3c77 | 102 | |
87756e15 RP |
103 | Things-to-lose: |
104 | ||
43e36dd2 RP |
105 | # The lines between the "Do-last:" line and the end of the file |
106 | # are executed as a /bin/sh shell script after everything else is | |
107 | # done. | |
108 | ||
a93b3c77 RP |
109 | Do-last: |
110 | ||
7b85349f RP |
111 | if ( echo $* | egrep verbose > /dev/null ) ; then |
112 | verbose=true | |
113 | else | |
114 | verbose= | |
115 | fi | |
116 | ||
117 | if [ -n "${verbose}" ] ; then | |
118 | echo Looking for signs of \"v9\"... | |
119 | fi | |
eebff21c JG |
120 | |
121 | # Don't try to clean directories here, as the 'mv' command will fail. | |
122 | # Also, grep fails on NFS mounted directories. | |
123 | if ( echo $* | grep keep\-v9 > /dev/null ) ; then | |
124 | for i in * ; do | |
125 | if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then | |
7b85349f RP |
126 | if [ -n "${verbose}" ] ; then |
127 | echo Keeping v9 stuff in $i | |
128 | fi | |
eebff21c JG |
129 | fi |
130 | done | |
131 | else | |
132 | for i in * ; do | |
133 | if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then | |
7b85349f RP |
134 | if [ -n "${verbose}" ] ; then |
135 | echo Cleaning the \"v9\" out of $i... | |
136 | fi | |
e00efef1 | 137 | cp $i new |
eebff21c JG |
138 | sed '/start\-sanitize\-v9/,/end-\sanitize\-v9/d' < $i > new |
139 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
140 | mv $i .Recover | |
141 | fi | |
142 | mv new $i | |
eebff21c JG |
143 | fi |
144 | done | |
145 | fi | |
146 | ||
7b85349f RP |
147 | if [ -n "${verbose}" ] ; then |
148 | echo Thawing away the \"chill\"... | |
149 | fi | |
5d4ec851 FF |
150 | |
151 | # Don't try to clean directories here, as the 'mv' command will fail. | |
152 | # Also, grep fails on NFS mounted directories. | |
153 | if ( echo $* | grep keep\-chill > /dev/null ) ; then | |
154 | for i in * ; do | |
155 | if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then | |
7b85349f RP |
156 | if [ -n "${verbose}" ] ; then |
157 | echo Keeping chill stuff in $i | |
158 | fi | |
5d4ec851 FF |
159 | fi |
160 | done | |
161 | else | |
162 | for i in * ; do | |
163 | if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then | |
7b85349f RP |
164 | if [ -n "${verbose}" ] ; then |
165 | echo Thawing the \"chill\" out of $i... | |
166 | fi | |
5d4ec851 FF |
167 | cp $i new |
168 | sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new | |
169 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
7b85349f RP |
170 | if [ -n "${verbose}" ] ; then |
171 | echo Caching $i in .Recover... | |
172 | fi | |
5d4ec851 FF |
173 | mv $i .Recover |
174 | fi | |
175 | mv new $i | |
176 | fi | |
177 | done | |
5d4ec851 FF |
178 | fi |
179 | ||
e11b54be PB |
180 | for i in * ; do |
181 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then | |
7b85349f | 182 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 |
e11b54be PB |
183 | fi |
184 | done | |
57d32184 RP |
185 | |
186 | # eof |