1 # .Sanitize for devo/gdb/testsuite.
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 gdbtk_files="gdb.gdbtk"
20 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
21 lose_these_too="${gdbtk_files} ${lose_these_too}"
22 if [ -n "${verbose}" ] ; then
23 echo Deleting ${gdbtk_files}
26 keep_these_too="${gdbtk_files} ${keep_these_too}"
27 if [ -n "${verbose}" ] ; then
28 echo Keeping ${gdbtk_files}
32 # All files listed between the "Things-to-keep:" line and the
33 # "Do-last:" line will be kept. All other files will be removed.
34 # Directories listed in this section will have their own Sanitize
35 # called. Directories not listed will be removed in their entirety
62 # The lines between the "Do-last:" line and the end of the file
63 # are executed as a /bin/sh shell script after everything else is
68 never_files="ChangeLog"
69 for i in $never_files ; do
70 if test ! -d $i && (grep sanitize-cygnus-never $i > /dev/null) ; then
71 if [ -n "${verbose}" ] ; then
72 echo Removing traces of \"cygnus-never\" from $i...
75 sed '/start\-sanitize\-cygnus-never/,/end\-sanitize\-cygnus-never/d' < $i > new
76 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
77 if [ -n "${verbose}" ] ; then
78 echo Caching $i in .Recover...
86 am33_files="ChangeLog"
87 if ( echo $* | grep keep\-am33 > /dev/null ) ; then
88 for i in $am33_files ; do
89 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
90 if [ -n "${verbose}" ] ; then
91 echo Keeping am33 stuff in $i
96 for i in $am33_files ; do
97 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
98 if [ -n "${verbose}" ] ; then
99 echo Removing traces of \"am33\" from $i...
102 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
103 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
104 if [ -n "${verbose}" ] ; then
105 echo Caching $i in .Recover...
114 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
115 echo Catering to RMS by removing traces of \"gdbtk\"...
117 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
118 echo Removing traces of \"gdbtk\" out of $i...
120 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
121 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
122 echo Caching $i in .Recover...
129 echo Leaving \"gdbtk\" in the sources...
131 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
132 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
134 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
135 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
136 echo Caching $i in .Recover...
145 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
146 echo '***' Some mentions of Sanitize are still left in $i! 1>&2