Write local and system-wide sbclrc

This commit is contained in:
Marcus Kammer 2023-12-24 12:24:33 +01:00
parent d48b065a2d
commit 9dc10aad76

View file

@ -456,6 +456,9 @@ write_files:
- path: /etc/sbclrc
content: |
;;; -*- lisp -*-
;;; System-wide startup file for sbcl
;;; https://github.com/ghollisjr/sbcl-script
;;; If the first user-processable command-line argument is a filename,
;;; disable the debugger, load the file handling shebang-line and quit.
@ -478,6 +481,37 @@ write_files:
(load script)
(quit)))
(defun print-condition-hook (condition hook)
"This function is designed to be used as a custom debugger hook.
It prints the condition (error message), clears any remaining input,
and aborts the current operation."
;; Ignore the hook argument since it's not used in this function.
(declare (ignore hook))
;; Print the error message associated with the condition.
(princ condition)
;; Clear any pending input from the stream.
(clear-input)
;; Abort the current operation and return to the top-level.
(abort))
;; Get the value of the global variable *debugger-hook*.
*debugger-hook*
;; Set the global variable *debugger-hook* to the custom debugger hook
;; function 'print-condition-hook'. This function will now be called
;; whenever an unhandled error occurs.
(setf *debugger-hook* #'print-condition-hook)
- path: /home/cl/.sbclrc
owner: 'cl:cl'
defer: True
content: |
;;; -*- lisp -*-
(sb-ext:set-sbcl-source-location "~/sbcl/")
- path: /home/cl/lisp_01_setup_sbcl.sh
owner: 'cl:cl'
permissions: '0755'
@ -513,7 +547,6 @@ write_files:
sudo apt install -y libev4 libsqlite3-dev
curl https://beta.quicklisp.org/quicklisp.lisp -o ~/quicklisp.lisp
sbcl --noinform --load quicklisp.lisp --eval '(quicklisp-quickstart:install)' --non-interactive
curl https://git.sr.ht/~marcuskammer/cloudinit/blob/main/.sbclrc -o ~/.sbclrc
sbcl --noinform --eval "(ql:quickload '(:hunchentoot :cl-yaml :cl-json :jonathan :spinneret :dexador :rove :vecto :woo :clsql-sqlite3 :mito :bknr.datastore :cl-project))" --non-interactive
- path: /home/cl/lisp_03_load_swank_faster.lisp