1 # .Sanitize for devo/config
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 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
19 keep_these_too="${keep_these_too} mt-r5900"
21 lose_these_too="${lose_these_too} mt-r5900"
24 if ( echo $* | grep lose\-mswin > /dev/null ) ; then
25 lose_these_too="${lose_these_too} mh-windows"
27 keep_these_too="${keep_these_too} mh-windows"
30 if ( echo $* | grep keep\-sky > /dev/null ) ; then
31 keep_these_too="${keep_these_too} mt-sky"
33 lose_these_too="${lose_these_too} mt-sky"
36 # All files listed between the "Things-to-keep:" line and the
37 # "Do-last:" line will be kept. All other files will be removed.
38 # Directories listed in this section will have their own Sanitize
39 # called. Directories not listed will be removed in their entirety
99 # The lines between the "Do-last:" line and the end of the file
100 # are executed as a /bin/sh shell script after everything else is
105 r5900_files="ChangeLog"
106 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
107 for i in $r5900_files ; do
108 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
109 if [ -n "${verbose}" ] ; then
110 echo Keeping r5900 stuff in $i
115 for i in $r5900_files ; do
116 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
117 if [ -n "${verbose}" ] ; then
118 echo Removing traces of \"r5900\" from $i...
121 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
122 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
123 if [ -n "${verbose}" ] ; then
124 echo Caching $i in .Recover...
133 sky_files="ChangeLog"
134 if ( echo $* | grep keep\-sky > /dev/null ) ; then
135 for i in $sky_files ; do
136 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
137 if [ -n "${verbose}" ] ; then
138 echo Keeping sky stuff in $i
143 for i in $sky_files ; do
144 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
145 if [ -n "${verbose}" ] ; then
146 echo Removing traces of \"sky\" from $i...
149 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
150 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
151 if [ -n "${verbose}" ] ; then
152 echo Caching $i in .Recover...
161 cygnus_files="mh-go32"
162 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
163 for i in $cygnus_files ; do
164 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
165 if [ -n "${verbose}" ] ; then
166 echo Keeping cygnus stuff in $i
171 for i in $cygnus_files ; do
172 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
173 if [ -n "${verbose}" ] ; then
174 echo Removing traces of \"cygnus\" from $i...
177 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
178 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
179 if [ -n "${verbose}" ] ; then
180 echo Caching $i in .Recover...