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
61 # The lines between the "Do-last:" line and the end of the file
62 # are executed as a /bin/sh shell script after everything else is
67 never_files="ChangeLog"
68 for i in $never_files ; do
69 if test ! -d $i && (grep sanitize-cygnus-never $i > /dev/null) ; then
70 if [ -n "${verbose}" ] ; then
71 echo Removing traces of \"cygnus-never\" from $i...
74 sed '/start\-sanitize\-cygnus-never/,/end\-sanitize\-cygnus-never/d' < $i > new
75 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
76 if [ -n "${verbose}" ] ; then
77 echo Caching $i in .Recover...
85 am33_files="ChangeLog"
86 if ( echo $* | grep keep\-am33 > /dev/null ) ; then
87 for i in $am33_files ; do
88 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
89 if [ -n "${verbose}" ] ; then
90 echo Keeping am33 stuff in $i
95 for i in $am33_files ; do
96 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
97 if [ -n "${verbose}" ] ; then
98 echo Removing traces of \"am33\" from $i...
101 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
102 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
103 if [ -n "${verbose}" ] ; then
104 echo Caching $i in .Recover...
113 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
114 echo Catering to RMS by removing traces of \"gdbtk\"...
116 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
117 echo Removing traces of \"gdbtk\" out of $i...
119 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
120 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
121 echo Caching $i in .Recover...
128 echo Leaving \"gdbtk\" in the sources...
130 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
131 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
133 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
134 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
135 echo Caching $i in .Recover...
144 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
145 echo '***' Some mentions of Sanitize are still left in $i! 1>&2