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 d10v_files="c-d10v.texi"
20 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
21 keep_these_too="${d10v_files} ${keep_these_too}"
23 lose_these_too="${d10v_files} ${lose_these_too}"
26 # All files listed between the "Things-to-keep:" line and the
27 # "Files-to-sed:" line will be kept. All other files will be removed.
28 # Directories listed in this section will have their own Sanitize
29 # called. Directories not listed will be removed in their entirety
59 # Don't try to clean directories here, as the 'mv' command will fail.
60 # Also, grep fails on NFS mounted directories.
62 if [ -n "${verbose}" ] ; then
63 echo Processing \"arc\"...
66 arc_files="all.texi as.texinfo"
67 if ( echo $* | grep keep\-arc > /dev/null ) ; then
68 for i in $arc_files ; do
69 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
70 if [ -n "${verbose}" ] ; then
71 echo Keeping arc stuff in $i
76 for i in $arc_files ; do
77 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
78 if [ -n "${verbose}" ] ; then
79 echo Removing traces of \"arc\" from $i...
82 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
83 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
84 if [ -n "${verbose}" ] ; then
85 echo Caching $i in .Recover...
93 if [ -n "${verbose}" ] ; then
94 echo Processing \"arc\"...
97 d10v_files="all.texi as.texinfo"
98 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
99 for i in $d10v_files ; do
100 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
101 if [ -n "${verbose}" ] ; then
102 echo Keeping d10v stuff in $i
107 for i in $d10v_files ; do
108 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
109 if [ -n "${verbose}" ] ; then
110 echo Removing traces of \"d10v\" from $i...
113 sed '/start\-sanitize\-d10v/,/end-\sanitize\-d10v/d' < $i > new
114 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
115 if [ -n "${verbose}" ] ; then
116 echo Caching $i in .Recover...
126 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
127 echo '***' Some mentions of Sanitize are still left in $i! 1>&2