1 # Sanitize.in for devo.
4 # Each directory to survive it's way into a release will need a file
5 # like this one called "./.Sanitize". All keyword lines must exist,
6 # and must exist in the order specified by this file. Each directory
7 # in the tree will be processed, top down, in the following order.
9 # Hash started lines like this one are comments and will be deleted
10 # before anything else is done. Blank lines will also be squashed
13 # The lines between the "Do-first:" line and the "Things-to-keep:"
14 # line are executed as a /bin/sh shell script before anything else is
21 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
22 keep_these_too="${v850_files} ${keep_these_too}"
24 lose_these_too="${v850_files} ${lose_these_too}"
27 # All files listed between the "Things-to-keep:" line and the
28 # "Files-to-sed:" line will be kept. All other files will be removed.
29 # Directories listed in this section will have their own Sanitize
30 # called. Directories not listed will be removed in their entirety
53 d30v_files="ChangeLog common.h"
54 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
55 for i in $d30v_files ; do
56 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
57 if [ -n "${verbose}" ] ; then
58 echo Keeping d30v stuff in $i
63 for i in $d30v_files ; do
64 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
65 if [ -n "${verbose}" ] ; then
66 echo Removing traces of \"d30v\" from $i...
69 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
70 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
71 if [ -n "${verbose}" ] ; then
72 echo Caching $i in .Recover...
81 v850_files="ChangeLog common.h"
82 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
83 for i in $v850_files ; do
84 if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then
85 if [ -n "${verbose}" ] ; then
86 echo Keeping v850eq stuff in $i
91 for i in $v850_files ; do
92 if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then
93 if [ -n "${verbose}" ] ; then
94 echo Removing traces of \"v850eq\" from $i...
97 sed '/start\-sanitize\-v850eq/,/end\-sanitize\-v850eq/d' < $i > new
98 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
99 if [ -n "${verbose}" ] ; then
100 echo Caching $i in .Recover...
108 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
109 for i in $v850_files ; do
110 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
111 if [ -n "${verbose}" ] ; then
112 echo Keeping v850eq stuff in $i
117 for i in $v850_files ; do
118 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
119 if [ -n "${verbose}" ] ; then
120 echo Removing traces of \"v850e\" from $i...
123 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
124 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
125 if [ -n "${verbose}" ] ; then
126 echo Caching $i in .Recover...
134 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
135 for i in $v850_files ; do
136 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
137 if [ -n "${verbose}" ] ; then
138 echo Keeping v850 stuff in $i
143 for i in $v850_files ; do
144 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
145 if [ -n "${verbose}" ] ; then
146 echo Removing traces of \"v850\" from $i...
149 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
150 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
151 if [ -n "${verbose}" ] ; then
152 echo Caching $i in .Recover...
162 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
163 echo '***' Some mentions of Sanitize are still left in $i! 1>&2