Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look for quicklisp in /var/lib or /home directory #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion repl.lisp
Original file line number Diff line number Diff line change
@@ -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/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mentioning v-refracta might be a private comment not needed here?

My 2c.

(let ((home-quicklisp (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))
(var-quicklisp (merge-pathnames "setup.lisp" #p"/var/lib/quicklisp/")))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, this var-quicklisp is inside the let, it is badly indented here.

(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")
Expand Down