ASDF2-compatible delfasls
I use ASDF2 via Quicklisp for a lot of my Lisp work these days (Quicklisp rocks!). I like to keep my systems warning-free, so I recompile often. In order to do that, I've always used a script named delfasls
. It was simple when my fasls were stored in the same directory as my code:
find . -name "*.fasl" -delete
ASDF2 stores the fasls in a separate directory, however, so I needed delfasls
to be smart about that. Just did that today:
#!/bin/bash find . -name "*.*fsl" -delete find . -name "*.fasl" -delete # Delete the asdf2 cached fasl files for the current directory DIR=`pwd` if cd ~/.cache/common-lisp 2>/dev/null; then CACHE=`pwd` for D in `ls`; do FASLDIR="$CACHE/$D$DIR" #echo $FASLDIR if cd $FASLDIR 2>/dev/null; then find . -name "*.*fsl" -delete find . -name "*.fasl" -delete fi done fi
The $D are one directory
The $D are one directory for each version of each Lisp implementation, e.g. ccl-1.5-f94-linux-amd64
, ccl-1.6-f94-linux-amd64
, sbcl-1.0.40.0.debian-linux-x86
find has a -delete action
I just learned from a co-worker about find
's -delete
action, so I changed my script to use it, instead of piping to xargs rm -f
.
Previous Posts:
Democrat Gunwalker defense strategy: repeat the lie. Repeat the Lie. REPEAT THE LIE!!!! Holocaust Causation Deniers want more gun control.
RISUG/Vasalgel
Identification and the Security State
Quote
An Open Letter to Arne Duncan, General (Ad Hoc) of the Department of "Education" Jack-Booted Door Kickers
Quote
Raspberry Pi Foundation
Comment Posting Fixed
iOS 4.3.3 Wifi Problems
The 16 Steps Out Of Islamophobia
Nice
Nice script Bill. It neatly documents the entire multi-directory caching scheme at a glance. I'm not sure what each $D looks like, but it doesn't really matter does it?
Edit comment