|
Revision 2179, 0.5 KB
(checked in by Chuck.Esterbrook, 3 years ago)
|
|
Minor fix/improvement to the "clean" script.
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/bin/bash |
|---|
| 2 | |
|---|
| 3 | find=$FIND |
|---|
| 4 | if [ -z "$find" ]; then |
|---|
| 5 | find=find |
|---|
| 6 | fi; |
|---|
| 7 | |
|---|
| 8 | directory=$1 |
|---|
| 9 | if [ -z "$directory" ] |
|---|
| 10 | then |
|---|
| 11 | directory=. |
|---|
| 12 | fi |
|---|
| 13 | |
|---|
| 14 | echo directory is $directory |
|---|
| 15 | |
|---|
| 16 | clean() { |
|---|
| 17 | $find $directory -name "$1" -exec rm {} \; |
|---|
| 18 | } |
|---|
| 19 | |
|---|
| 20 | echo "du total:" |
|---|
| 21 | du -kc $directory | tail -1 |
|---|
| 22 | echo "cleaning..." |
|---|
| 23 | clean '*.cobra.cs' |
|---|
| 24 | clean 'Native*.cs' |
|---|
| 25 | clean 'test-*.cs' |
|---|
| 26 | clean 'r' |
|---|
| 27 | clean 'r-*' |
|---|
| 28 | clean '*.exe' |
|---|
| 29 | clean '*.dll' |
|---|
| 30 | clean '*.pdb' |
|---|
| 31 | clean '*.mdb' |
|---|
| 32 | clean '*.tmp' |
|---|
| 33 | clean 'cobra-exc*.html' |
|---|
| 34 | svn up 720-libraries/400-other |
|---|
| 35 | echo "du total:" |
|---|
| 36 | du -kc $directory | tail -1 |
|---|