1 # .Sanitize for devo/ld.
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 mpw_files="mpw-make.in mpw-config.in mpw-em.c ChangeLog.mpw"
20 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
21 keep_these_too="${mpw_files} ${keep_these_too}"
23 lose_these_too="${mpw_files} ${lose_these_too}"
26 # All files listed between the "Things-to-keep:" line and the
27 # "Files-to-sed:" line will be kept. All other files will be removed.
28 # Directories listed in this section will have their own Sanitize
29 # called. Directories not listed will be removed in their entirety
84 echo Looking for traces of \"mpw\"...
86 # Don't try to clean directories here, as the 'mv' command will fail.
87 # Also, grep fails on NFS mounted directories.
88 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
90 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
91 echo Keeping mpw traces in $i
96 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
97 echo Removing traces of \"mpw\" out of $i...
99 sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new
100 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
101 echo Caching $i in .Recover...
109 rce_files="configure.in Makefile.in"
111 if ( echo $* | grep keep\-rce > /dev/null ) ; then
112 for i in $rce_files ; do
113 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
114 if [ -n "${verbose}" ] ; then
115 echo Keeping rce stuff in $i
120 for i in $rce_files ; do
121 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
122 if [ -n "${verbose}" ] ; then
123 echo Removing traces of \"rce\" from $i...
126 sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new
127 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
128 if [ -n "${verbose}" ] ; then
129 echo Caching $i in .Recover...
138 arc_files="ChangeLog configure.in Makefile.in"
140 if ( echo $* | grep keep\-arc > /dev/null ) ; then
141 for i in $arc_files ; do
142 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
143 if [ -n "${verbose}" ] ; then
144 echo Keeping arc stuff in $i
149 for i in $arc_files ; do
150 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
151 if [ -n "${verbose}" ] ; then
152 echo Removing traces of \"arc\" from $i...
155 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
156 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
157 if [ -n "${verbose}" ] ; then
158 echo Caching $i in .Recover...
168 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
169 echo '***' Some mentions of Sanitize are still left in $i! 1>&2