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
67 if [ -n "${verbose}" ] ; then
68 echo Processing \"tic80\"...
71 tic80_files="ChangeLog dis-asm.h"
72 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
73 for i in $tic80_files ; do
74 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
75 if [ -n "${verbose}" ] ; then
76 echo Keeping tic80 stuff in $i
81 for i in $tic80_files ; do
82 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
83 if [ -n "${verbose}" ] ; then
84 echo Removing traces of \"tic80\" from $i...
87 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
88 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
89 if [ -n "${verbose}" ] ; then
90 echo Caching $i in .Recover...
99 if [ -n "${verbose}" ] ; then
100 echo Processing \"sky\"...
103 sky_files="ChangeLog dis-asm.h"
104 if ( echo $* | grep keep\-sky > /dev/null ) ; then
105 for i in $sky_files ; do
106 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
107 if [ -n "${verbose}" ] ; then
108 echo Keeping sky stuff in $i
113 for i in $sky_files ; do
114 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
115 if [ -n "${verbose}" ] ; then
116 echo Removing traces of \"sky\" from $i...
119 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
120 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
121 if [ -n "${verbose}" ] ; then
122 echo Caching $i in .Recover...
131 if [ -n "${verbose}" ] ; then
132 echo Processing \"java\"...
135 java_files="ChangeLog demangle.h"
136 if ( echo $* | grep keep\-java > /dev/null ) ; then
137 for i in $java_files ; do
138 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
139 if [ -n "${verbose}" ] ; then
140 echo Keeping java stuff in $i
146 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
147 if [ -n "${verbose}" ] ; then
148 echo Removing traces of \"java\" from $i...
151 sed '/start\-sanitize\-java/,/end-\sanitize\-java/d' < $i > new
152 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
153 if [ -n "${verbose}" ] ; then
154 echo Caching $i in .Recover...
164 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
165 echo '***' Some mentions of Sanitize are still left in $i! 1>&2