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 cygnus_files="release release-info build-all.mk"
20 if ( echo $* | grep keep\-cygnus > /dev/null) ; then
21 keep_these_too="${keep_these_too} ${cygnus_files}"
23 lose_these_too="${lose_these_too} ${cygnus_files}"
26 mpw_files="mpw-README mpw-configure mpw-config.in mpw-build.in ChangeLog.mpw"
28 if ( echo $* | grep keep\-mpw > /dev/null) ; then
29 keep_these_too="${keep_these_too} ${mpw_files}"
31 lose_these_too="${lose_these_too} ${mpw_files}"
34 # All files listed between the "Things-to-keep:" line and the
35 # "Do-last:" line will be kept. All other files will be removed.
36 # Directories listed in this section will have their own Sanitize
37 # called. Directories not listed will be removed in their entirety
119 # The lines between the "Do-last:" line and the end of the file
120 # are executed as a /bin/sh shell script after everything else is
125 if ( echo $* | egrep verbose > /dev/null ) ; then
131 # Remove "sanitize-Sanitize" lines.
132 if [ -n "${verbose}" ] ; then
133 echo Cleaning unconditional sanitizations out of Makefile.in...
136 sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new
137 if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
138 mv Makefile.in .Recover
142 if [ -n "${verbose}" ] ; then
143 echo Thawing away the \"chill\"...
146 # Don't try to clean directories here, as the 'mv' command will fail.
147 # Also, grep fails on NFS mounted directories.
148 if ( echo $* | grep keep\-chill > /dev/null ) ; then
150 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
151 if [ -n "${verbose}" ] ; then
152 echo Keeping chill stuff in $i
158 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
159 if [ -n "${verbose}" ] ; then
160 echo Thawing the \"chill\" out of $i...
163 sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new
164 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
165 if [ -n "${verbose}" ] ; then
166 echo Caching $i in .Recover...
175 if [ -n "${verbose}" ] ; then
176 echo Removing traces of \"mpw\"...
179 # Don't try to clean directories here, as the 'mv' command will fail.
180 # Also, grep fails on NFS mounted directories.
181 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
183 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
184 if [ -n "${verbose}" ] ; then
185 echo Keeping mpw stuff in $i
191 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
192 if [ -n "${verbose}" ] ; then
193 echo Removing traces of \"mpw\" from $i...
196 sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new
197 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
198 if [ -n "${verbose}" ] ; then
199 echo Caching $i in .Recover...
209 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
210 echo '***' Some mentions of Sanitize are still left in $i! 1>&2