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
19 d30v_files="c-d30v.texi"
21 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
22 keep_these_too="${d30v_files} ${keep_these_too}"
24 lose_these_too="${d30v_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
65 v850e_files="c-v850.texi"
66 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
67 for i in $v850e_files ; do
68 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
69 if [ -n "${verbose}" ] ; then
70 echo Keeping v850e stuff in $i
75 for i in $v850e_files ; do
76 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
77 if [ -n "${verbose}" ] ; then
78 echo Removing traces of \"v850e\" from $i...
81 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
82 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
83 if [ -n "${verbose}" ] ; then
84 echo Caching $i in .Recover...
93 d30v_files="as.texinfo all.texi"
94 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
95 for i in $d30v_files ; do
96 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
97 if [ -n "${verbose}" ] ; then
98 echo Keeping d30v stuff in $i
103 for i in $d30v_files ; do
104 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
105 if [ -n "${verbose}" ] ; then
106 echo Removing traces of \"d30v\" from $i...
109 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
110 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
111 if [ -n "${verbose}" ] ; then
112 echo Caching $i in .Recover...
121 m32rx_files="c-m32r.texi as.texinfo"
122 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
123 for i in $m32rx_files ; do
124 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
125 if [ -n "${verbose}" ] ; then
126 echo Keeping m32rx stuff in $i
131 for i in $m32rx_files ; do
132 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
133 if [ -n "${verbose}" ] ; then
134 echo Removing traces of \"m32rx\" from $i...
137 sed '/start\-sanitize\-m32rx/,/end-\sanitize\-m32rx/d' < $i > new
138 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
139 if [ -n "${verbose}" ] ; then
140 echo Caching $i in .Recover...
149 # Don't try to clean directories here, as the 'mv' command will fail.
150 # Also, grep fails on NFS mounted directories.
153 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
154 echo '***' Some mentions of Sanitize are still left in $i! 1>&2