1 # .Sanitize for devo/include/opcode.
3 # Each directory to survive it's 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
20 if ( echo $* | grep keep\-arc > /dev/null ) ; then
21 keep_these_too="${arc_files} ${keep_these_too}"
23 lose_these_too="${arc_files} ${lose_these_too}"
28 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
29 keep_these_too="${d10v_files} ${keep_these_too}"
31 lose_these_too="${d10v_files} ${lose_these_too}"
36 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
37 keep_these_too="${v850_files} ${keep_these_too}"
39 lose_these_too="${v850_files} ${lose_these_too}"
44 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
45 keep_these_too="${tic80_files} ${keep_these_too}"
47 lose_these_too="${tic80_files} ${lose_these_too}"
51 # All files listed between the "Things-to-keep:" line and the
52 # "Files-to-sed:" line will be kept. All other files will be removed.
53 # Directories listed in this section will have their own Sanitize
54 # called. Directories not listed will be removed in their entirety
88 if ( echo $* | grep keep\-arc > /dev/null ) ; then
89 for i in $arc_files ; do
90 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
91 if [ -n "${verbose}" ] ; then
92 echo Keeping arc stuff in $i
97 for i in $arc_files ; do
98 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
99 if [ -n "${verbose}" ] ; then
100 echo Removing traces of \"arc\" from $i...
103 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
104 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
105 if [ -n "${verbose}" ] ; then
106 echo Caching $i in .Recover...
116 d10v_files="ChangeLog"
117 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
118 for i in $d10v_files ; do
119 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
120 if [ -n "${verbose}" ] ; then
121 echo Keeping d10v stuff in $i
126 for i in $d10v_files ; do
127 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
128 if [ -n "${verbose}" ] ; then
129 echo Removing traces of \"d10v\" from $i...
132 sed '/start\-sanitize\-d10v/,/end-\sanitize\-d10v/d' < $i > new
133 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
134 if [ -n "${verbose}" ] ; then
135 echo Caching $i in .Recover...
144 v850_files="ChangeLog"
145 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
146 for i in $v850_files ; do
147 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
148 if [ -n "${verbose}" ] ; then
149 echo Keeping v850 stuff in $i
154 for i in $v850_files ; do
155 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
156 if [ -n "${verbose}" ] ; then
157 echo Removing traces of \"v850\" from $i...
160 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
161 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
162 if [ -n "${verbose}" ] ; then
163 echo Caching $i in .Recover...
172 tic80_files="ChangeLog"
173 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
174 for i in $tic80_files ; do
175 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
176 if [ -n "${verbose}" ] ; then
177 echo Keeping tic80 stuff in $i
182 for i in $tic80_files ; do
183 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
184 if [ -n "${verbose}" ] ; then
185 echo Removing traces of \"tic80\" from $i...
188 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
189 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
190 if [ -n "${verbose}" ] ; then
191 echo Caching $i in .Recover...
202 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
203 echo '***' Some mentions of Sanitize are still left in $i! 1>&2