3 #########################################################################
4 # This program is free software: you can redistribute it and/or modify #
5 # it under the terms of the version 3 of the GNU General Public License #
6 # as published by the Free Software Foundation. #
8 # This program is distributed in the hope that it will be useful, but #
9 # WITHOUT ANY WARRANTY; without even the implied warranty of #
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
11 # General Public License for more details. #
13 # You should have received a copy of the GNU General Public License #
14 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
16 # Written by and Copyright (C) Francois Fleuret #
17 # Contact <francois@fleuret.org> for comments & bug reports #
18 #########################################################################
20 TRASH=$(mktemp -d /tmp/trash.XXXXXX)
22 # "pdf:fig" "pdf:png" "pdf:pgm"
24 for i in "nav:tex" "snm:tex" "toc:tex" "blg:tex" \
25 "idx:tex" "ilg:tex" "ind:tex" "lof:tex" "lot:tex" "lou:tex" \
26 "dvi:tex" "log:tex" "aux:tex" "bbl:tex" \
27 "ps:tex" "pdf:tex" "out:tex" "tpt:tex" "brf:tex" \
28 "eps:fig" "eps:png" "eps:pgm" \
30 PRODUCED=$(echo $i | cut -f 1 -d:)
31 SOURCE=$(echo $i | cut -f 2 -d :)
32 for f in *.$PRODUCED; do
33 ORIGINAL=${f/.$PRODUCED/.$SOURCE}
34 if [ -f "${ORIGINAL}" ]; then
35 echo "move $f to ${TRASH} ($ORIGINAL exists)"
41 for i in "mozilla.ps" "a.out"; do
43 echo "move $i to ${TRASH}"
48 for f in $(find -type f -executable); do
49 if [ -f ${f}.cc ] || [ -f ${f}.c ]; then
50 echo "move $f to ${TRASH} (source code exists)"