apenwarr-redo/clean.do
Avery Pennarun 2efbbc26b9 Don't crash on targets in directories that don't exist yet.
The reason we'd crash is that we tried to pre-create a file called
$target.redo.tmp, which wouldn't work because the directory containing
$target didn't exist.

We now try to generate a smarter filename by using the innermost directory
of target that *does* exist.  It's a little messy, but the idea is to make
sure we won't have to rename() across a filesystem boundary if, for example,
there's a mounted filesystem in the middle of the hierarchy somewhere.
2011-03-22 23:00:34 -07:00

10 lines
301 B
Text

rm -rf t/.redo redo-sh
if [ -e .do_built ]; then
while read x; do
[ -d "$x" ] || rm -f "$x"
done <.do_built
fi
[ -z "$DO_BUILT" ] && rm -rf .do_built .do_built.dir
redo t/clean Documentation/clean version/clean
rm -f *~ .*~ */*~ */.*~ *.pyc install.wrapper
find . -name '*.tmp' -exec rm -fv {} \;