Skip to content

Instantly share code, notes, and snippets.

@wsgac
Created November 21, 2023 13:34
Show Gist options
  • Save wsgac/19783279f1baa240e4224f7567cfe3fa to your computer and use it in GitHub Desktop.
Save wsgac/19783279f1baa240e4224f7567cfe3fa to your computer and use it in GitHub Desktop.
A self-updating SBCL config for propagating the same version of Lisp files across multiple systems
;; -*-lisp-*-
(ql:quickload :legit)
(defun sync-utils ()
(let* ((repo (make-instance 'legit:repository
:location "/home/wsg/hack/lisp/util-gist/"))
(remote "git@gist.github.com:9323a1b03108d4ff10570c26a21425c1.git"))
(legit:init repo :if-does-not-exist :clone :remote remote)
(legit:pull repo)
(load (merge-pathnames #p"util.lisp" (legit:location repo)))))
(sync-utils)
@wsgac
Copy link
Author

wsgac commented Nov 21, 2023

I worked out a simple config file for SBCL that feeds off a GitHub gist. It establishes a directory for that gist's clone, updates it using legit and loads the util.lisp file from there. Obviously, it can easily be extended to load multiple such sources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment