#! /bin/sh # currently not used removeiflisp() { lispfile=`echo $1 | sed 's/\.[^\.]+$/.lisp/'` if [ -f $lispfile ] ; then rm $1 fi } checkpath () { ( cd ../.. if ! [ -d src/lisp/. ] ; then echo 'You are not in the src/lisp/ directory!' 1>&2 echo 'May be a symlink issue.' 1>&2 echo 'Make sure src/lisp/../../ will end up in' \ 'the root of the CMUCL sources' 1>&2 exit 1 fi ) } remove_compiled () { find ../../$1 \( -name *.sparcf -or -name *.lbytef -or -name \*.assem \ -or -name *.bytef -or -name *.rtf -or -name *.eapcf -or -name *.pmaxf \ -or -name *.sgif -or -name *.axpf -or -name *.hpf -or -name \*.x86f \)\ -print | xargs rm -f } checkpath if [ $# = 0 ] ; then echo 'Usage: subdir of ../.. (src fasl-crabuild or such)' 1>&2 exit 1 fi if [ $1 = ALL ] ; then dirs=`cd ../.. ; echo *` else dirs="$@" fi for dir in $dirs ; do remove_compiled $dir done