From 4fb39a801b057a98855ba3e15c6ad6fd02836e68 Mon Sep 17 00:00:00 2001 From: Valenoern Date: Wed, 3 May 2023 22:24:07 +0000 Subject: [PATCH] Look for quicklisp in /var/lib or /home directory --- repl.lisp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/repl.lisp b/repl.lisp index 8777233..284de99 100755 --- a/repl.lisp +++ b/repl.lisp @@ -1,5 +1,19 @@ #!/usr/bin/env -S sbcl --script -(load "~/quicklisp/setup") + +;; check for the two most likely places quicklisp is installed and try to load it +;; on v-refracta, it is simply installed in /var/lib/ +(let ((home-quicklisp (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname))) + (var-quicklisp (merge-pathnames "setup.lisp" #p"/var/lib/quicklisp/"))) + (handler-case + (cond + ((not (null (probe-file home-quicklisp))) (load home-quicklisp)) + ((not (null (probe-file var-quicklisp))) (load var-quicklisp)) + (t + (error 'simple-package-error + :package "QUICKLISP-CLIENT" + :format-control "Quicklisp does not appear to be installed.~%"))) + (package-error (condition) + (format *error-output* "Quicklisp does not appear to be installed.~%" condition)))) (let ((*standard-output* (make-broadcast-stream))) (ql:quickload "alexandria")