1 # .Sanitize for devo/include.
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.
19 # All files listed between the "Things-to-keep:" line and the
20 # "Files-to-sed:" line will be kept. All other files will be removed.
21 # Directories listed in this section will have their own Sanitize
22 # called. Directories not listed will be removed in their entirety
66 if [ -n "${verbose}" ] ; then
67 echo Processing \"tic80\"...
70 tic80_files="ChangeLog dis-asm.h"
71 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
72 for i in $tic80_files ; do
73 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
74 if [ -n "${verbose}" ] ; then
75 echo Keeping tic80 stuff in $i
80 for i in $tic80_files ; do
81 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
82 if [ -n "${verbose}" ] ; then
83 echo Removing traces of \"tic80\" from $i...
86 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
87 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
88 if [ -n "${verbose}" ] ; then
89 echo Caching $i in .Recover...
98 fr30_files="ChangeLog dis-asm.h"
99 if ( echo $* | grep keep\-fr30 > /dev/null ) ; then
100 for i in $fr30_files ; do
101 if test ! -d $i && (grep sanitize-fr30 $i > /dev/null) ; then
102 if [ -n "${verbose}" ] ; then
103 echo Keeping fr30 stuff in $i
108 for i in $fr30_files ; do
109 if test ! -d $i && (grep sanitize-fr30 $i > /dev/null) ; then
110 if [ -n "${verbose}" ] ; then
111 echo Removing traces of \"fr30\" from $i...
114 sed '/start\-sanitize\-fr30/,/end-\sanitize\-fr30/d' < $i > new
115 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
116 if [ -n "${verbose}" ] ; then
117 echo Caching $i in .Recover...
126 if [ -n "${verbose}" ] ; then
127 echo Processing \"sky\"...
130 sky_files="ChangeLog dis-asm.h"
131 if ( echo $* | grep keep\-sky > /dev/null ) ; then
132 for i in $sky_files ; do
133 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
134 if [ -n "${verbose}" ] ; then
135 echo Keeping sky stuff in $i
140 for i in $sky_files ; do
141 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
142 if [ -n "${verbose}" ] ; then
143 echo Removing traces of \"sky\" from $i...
146 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
147 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
148 if [ -n "${verbose}" ] ; then
149 echo Caching $i in .Recover...
158 if [ -n "${verbose}" ] ; then
159 echo Processing \"java\"...
162 java_files="ChangeLog demangle.h"
163 if ( echo $* | grep keep\-java > /dev/null ) ; then
164 for i in $java_files ; do
165 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
166 if [ -n "${verbose}" ] ; then
167 echo Keeping java stuff in $i
173 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
174 if [ -n "${verbose}" ] ; then
175 echo Removing traces of \"java\" from $i...
178 sed '/start\-sanitize\-java/,/end-\sanitize\-java/d' < $i > new
179 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
180 if [ -n "${verbose}" ] ; then
181 echo Caching $i in .Recover...
191 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
192 echo '***' Some mentions of Sanitize are still left in $i! 1>&2