Commit | Line | Data |
---|---|---|
a93b3c77 RP |
1 | # Sanitize.in for devo. |
2 | # $Id$ | |
3 | # | |
4 | ||
5 | # Each directory to survive it's way into a release will need a file | |
6 | # like this one called "./.Sanitize". All keyword lines must exist, | |
7 | # and must exist in the order specified by this file. Each directory | |
8 | # in the tree will be processed, top down, in the following order. | |
9 | ||
10 | # Hash started lines like this one are comments and will be deleted | |
11 | # before anything else is done. Blank lines will also be squashed | |
12 | # out. | |
13 | ||
14 | # The lines between the "Do-first:" line and the "Things-to-keep:" | |
15 | # line are executed as a /bin/sh shell script before anything else is | |
16 | # done in this | |
17 | ||
18 | Do-first: | |
19 | ||
20 | echo Sanitizing `pwd`... | |
21 | ||
22 | # All files listed between the "Things-to-keep:" line and the | |
23 | # "Files-to-sed:" line will be kept. All other files will be removed. | |
24 | # Directories listed in this section will have their own Sanitize | |
25 | # called. Directories not listed will be removed in their entirety | |
26 | # with rm -rf. | |
27 | ||
28 | Things-to-keep: | |
29 | ||
a93b3c77 | 30 | Makefile.in |
965a9f14 | 31 | README |
a93b3c77 | 32 | README.configure |
2f0559cc | 33 | bison |
d5eb68fa | 34 | bfd |
ebec4684 | 35 | binutils |
a93b3c77 | 36 | config |
66f30075 | 37 | config.sub |
a93b3c77 RP |
38 | configure |
39 | configure.in | |
cdabe523 | 40 | cvs |
5781b1ba | 41 | diff |
cdabe523 | 42 | emacs |
a93b3c77 | 43 | gas |
ebec4684 RP |
44 | gcc |
45 | gdb | |
f3d3d2cd | 46 | gdbm |
a93b3c77 | 47 | gnulib |
5781b1ba | 48 | grep |
a93b3c77 | 49 | include |
ebec4684 | 50 | ld |
a93b3c77 | 51 | libiberty |
cdabe523 RP |
52 | make |
53 | prms | |
3c8735af | 54 | rcs |
a93b3c77 | 55 | readline |
d239963b | 56 | texinfo |
a93b3c77 RP |
57 | |
58 | Do-last: | |
59 | ||
eebff21c JG |
60 | echo Looking for signs of \"v9\"... |
61 | ||
62 | # Don't try to clean directories here, as the 'mv' command will fail. | |
63 | # Also, grep fails on NFS mounted directories. | |
64 | if ( echo $* | grep keep\-v9 > /dev/null ) ; then | |
65 | for i in * ; do | |
66 | if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then | |
67 | echo Keeping v9 stuff in $i | |
68 | fi | |
69 | done | |
70 | else | |
71 | for i in * ; do | |
72 | if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then | |
73 | echo Cleaning the \"v9\" out of $i... | |
e00efef1 | 74 | cp $i new |
eebff21c JG |
75 | sed '/start\-sanitize\-v9/,/end-\sanitize\-v9/d' < $i > new |
76 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
77 | mv $i .Recover | |
78 | fi | |
79 | mv new $i | |
eebff21c JG |
80 | fi |
81 | done | |
82 | fi | |
83 | ||
320e1b86 JG |
84 | echo Looking for signs of \"life\"... |
85 | ||
86 | # Don't try to clean directories here, as the 'mv' command will fail. | |
87 | # Also, grep fails on NFS mounted directories. | |
88 | if ( echo $* | grep keep\-life > /dev/null ) ; then | |
89 | for i in * ; do | |
90 | if test ! -d $i && (grep sanitize-life $i > /dev/null) ; then | |
16871f33 | 91 | echo Keeping life alive in $i |
320e1b86 JG |
92 | fi |
93 | done | |
94 | else | |
95 | for i in * ; do | |
96 | if test ! -d $i && (grep sanitize-life $i > /dev/null) ; then | |
16871f33 | 97 | echo Beating the \"life\" out of $i... |
320e1b86 JG |
98 | cp $i new |
99 | sed '/start\-sanitize\-life/,/end-\sanitize\-life/d' < $i > new | |
100 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
101 | mv $i .Recover | |
102 | fi | |
103 | mv new $i | |
104 | fi | |
105 | done | |
106 | fi | |
107 | ||
16871f33 JG |
108 | if grep 'sanitize' * ; then |
109 | echo Some mentions of Sanitize are still left in the sources! | |
110 | fi | |
a93b3c77 | 111 | |
16871f33 | 112 | echo Done in `pwd`. |