Skip to content
Snippets Groups Projects
Commit a9a3979c authored by toy's avatar toy
Browse files

o Give a more complete usage description

o Add -l option to clean out the lisp C runtime and motif runtime as
  well as the fasls.
parent 73731016
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
if [ "$1" = "" ]
then
echo "Usage: $0 target-directory"
exit 1
fi
usage() {
echo "Usage: `basename $0` [-l] dir [dir1 dir2 ...]"
echo " -h This help"
echo " -l Clean out the C runtime as well"
echo ""
echo "Cleans out all Lisp fasls from the given directories"
echo "If -l is also given, the C runtime is cleared as well. This includes"
echo "all object files, the lisp binary itself, and any selected configuration"
echo "files. The motif server is also removed."
exit 1
}
if [ ! -d "$1" ]
then
echo "$1 isn't a directory"
exit 2
while getopts "h?l" arg
do
case $arg in
l) CLEAN_C=1 ;;
h | \?) usage; exit 1 ;;
esac
done
shift `expr $OPTIND - 1`
if [ $# -lt 1 ]; then
usage
fi
TARGET="`echo $1 | sed 's:/*$::'`"
for d in "$@"
do
if [ ! -d "$d" ]; then
echo "$d isn't a directory"
exit 2
fi
D="`echo $d | sed 's:/*$::'`"
TARGET="$TARGET $D"
done
find $TARGET -name "*.bytef" -o -name "*.lbytef" -o -name "*.assem" -o \
-name "*.axpf" -o \
......@@ -23,6 +45,15 @@ find $TARGET -name "*.bytef" -o -name "*.lbytef" -o -name "*.assem" -o \
-name "*.sparcf" -o \
-name "*.x86f" -o \
-name "*.core" | xargs rm 2> /dev/null
rm -f $TARGET/compile-*.log $TARGET/hemlock/spell-dictionary.bin 2> /dev/null
set -x
for d in $TARGET
do
rm -f $d/compile-*.log $d/hemlock/spell-dictionary.bin 2> /dev/null
if [ -n "$CLEAN_C" ]; then
rm -f $d/lisp/* $d/motif/server/*
done
done
true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment