-
Clone Kiln where ASDF can find it. (Usually
~/common-lisp
or~/quicklisp/local-projects
.) -
Bootstrap the executable:
- From a shell, run
make
in the Kiln directory. - OR, from a Lisp REPL, execute:
> (asdf:make "kiln")
This will generate an executable named
kiln
in the Kiln directory. - From a shell, run
-
Symlink (don’t copy!) the
kiln
executable into yourPATH
.# Assuming XDG-compliant Linux. $ ln -s $(pwd -P)/kiln ${HOME}/.local/bin/kiln
On an XDG-compliant Linux, with
~/.local/bin
on thePATH
, you can install with Make:$ make test && make install
-
Test Kiln is installed:
$ kiln version
If you want to make sure everything is working properly, you can tell Kiln to run a self-diagnostic:
$ kiln self-test
You can now use Kiln for writing shebang scripts. The remaining steps are for writing package scripts.
- Create a
local-scripts
system where ASDF can find it. Make it a package-inferred system:;; In file local-scripts.asd. (defsystem "local-scripts" :class :package-inferred-system)
- Write your first script as Lisp file in that directory. For example, write the following into
local-scripts/hello
:(defpackage :local-scripts/hello (:use :cl) (:documentation "Say hello")) (in-package :local-scripts/hello) ;; A Kiln script defines a single function named main ;; that takes a list of arguments. (defun main (args) (destructuring-bind (name) args (format t "Hello, ~a~%" name)))
- Run your script with Kiln:
$ kiln hello $(whoami) Hello