1d77d20d2c155347b40c0010737c105121aecd0a
[deliverable/binutils-gdb.git] / .Sanitize
1 # .Sanitize for devo.
2
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.
7
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
10 # out.
11
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
14 # done in this directory.
15
16 Do-first:
17
18 # All files listed between the "Things-to-keep:" line and the
19 # "Do-last:" line will be kept. All other files will be removed.
20 # Directories listed in this section will have their own Sanitize
21 # called. Directories not listed will be removed in their entirety
22 # with rm -rf.
23
24 Things-to-keep:
25
26 .cvsignore
27 CYGNUS
28 ChangeLog
29 Makefile.in
30 README
31 autoconf
32 bfd
33 binutils
34 bison
35 byacc
36 cfg-paper.texi
37 clib
38 config
39 config.sub
40 configure
41 configure.bat
42 configure.in
43 configure.man
44 configure.texi
45 cvs
46 diff
47 emacs
48 flex
49 gas
50 gcc
51 gdb
52 gdbm
53 gdbtest
54 glob
55 gprof
56 grep
57 include
58 ispell
59 ld
60 libg++
61 libgcc
62 libiberty
63 make
64 mmalloc
65 move-if-change
66 newlib
67 patch
68 prms
69 rcs
70 readline
71 send_pr
72 standards.texi
73 test-build.mk
74 texinfo
75 tgas
76
77 # The lines between the "Do-last:" line and the end of the file
78 # are executed as a /bin/sh shell script after everything else is
79 # done.
80
81 Do-last:
82
83 echo Looking for signs of \"v9\"...
84
85 # Don't try to clean directories here, as the 'mv' command will fail.
86 # Also, grep fails on NFS mounted directories.
87 if ( echo $* | grep keep\-v9 > /dev/null ) ; then
88 for i in * ; do
89 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
90 echo Keeping v9 stuff in $i
91 fi
92 done
93 else
94 for i in * ; do
95 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
96 echo Cleaning the \"v9\" out of $i...
97 cp $i new
98 sed '/start\-sanitize\-v9/,/end-\sanitize\-v9/d' < $i > new
99 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
100 mv $i .Recover
101 fi
102 mv new $i
103 fi
104 done
105 fi
106
107 echo Looking for signs of \"life\"...
108
109 # Don't try to clean directories here, as the 'mv' command will fail.
110 # Also, grep fails on NFS mounted directories.
111 if ( echo $* | grep keep\-life > /dev/null ) ; then
112 for i in * ; do
113 if test ! -d $i && (grep sanitize-life $i > /dev/null) ; then
114 echo Keeping life alive in $i
115 fi
116 done
117 else
118 for i in * ; do
119 if test ! -d $i && (grep sanitize-life $i > /dev/null) ; then
120 echo Beating the \"life\" out of $i...
121 cp $i new
122 sed '/start\-sanitize\-life/,/end-\sanitize\-life/d' < $i > new
123 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
124 mv $i .Recover
125 fi
126 mv new $i
127 fi
128 done
129 fi
130
131 for i in * ; do
132 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
133 echo Some mentions of Sanitize are still left in $i!
134 fi
135 done
136
137 # eof
This page took 0.036688 seconds and 4 git commands to generate.