|
#!/bin/bash
# CLEANUP
l=`pwd`
echo $l
lb=`basename $l`
ld=`dirname $l`
#echo " lb: $lb"
#echo " ld: $ld"
cdtarg=.
sloc=$l/scripts
if [ x$lb = "xscripts" ]
then
#echo "ld: $ld"
ldb=`basename $ld`
#echo "ldb: $ldb"
if [ x$ldb = "xcode" ]
then
cdtarg=..
sloc=$l
else
echo "Run from */code, not $l , giving up."
exit 1
fi
cd $cdtarg
if [ $? -ne 0 ]
then
echo "cd $cdtarg failed, giving up."
exit 1
fi
else
if [ x$lb = "xcode" ]
then
cdtarg="."
else
echo "Run from */code, not $l , giving up."
exit 1
fi
# No need to cd.
fi
l=`pwd`
#echo "Now at $l"
#echo "sloc $sloc"
# Won't work unless configure was done.
make distclean
# Some unlikely but possible files no one wants:
rm -f libdwarf/BLD
rm -f dwarfdump/BLD
rm -f dwarfgen/configure.lineno
rm -f ALLd*
rm -f junk* */junk*
rm -f *~ */*~
|