I've been playing around with Quicklisp lately, and have this minor problem working with scripts with Shebangs.
Setup
I did the following:
- Downloaded quicklisp with
curl https://beta.quicklisp.org/quicklisp.lisp -o /tmp/quicklisp.lisp
- Installed it with
(quicklisp-quickstart:install)
while having/tmp/quicklisp
loaded in the environment. - Added Quicklisp to init file using
(ql:add-to-init-file)
Problem
For a script that needs Quicklisp (specifically ASDF), I can run it with sbcl --load ~/quicklisp/setup.lisp --script start.lisp
just fine. However, when I run it as a standalone script with the Shebang /usr/bin/env sbcl --script
, it fails with an error saying that it isn't able to find things like UIOP
, etc. unless I place the below two lines in the script itself:
(load "~/quicklisp/setup.lisp")
(ql:quickload "asdf")
You can find my stupid experiment here, and the script in question here.
PS: Any pointers would be really helpful.
PPS: I'm sure it's a stupid mistake on my end, forgive me.