From ed28198cb5ecc78fed13e5fd08b6119dbdfc7046 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Thu, 28 May 2020 17:06:13 +0200 Subject: [PATCH] local/bin/sbclscript-gen: Init. --- .local/bin/sbclscript-gen | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 .local/bin/sbclscript-gen diff --git a/.local/bin/sbclscript-gen b/.local/bin/sbclscript-gen new file mode 100755 index 00000000..b54fafc2 --- /dev/null +++ b/.local/bin/sbclscript-gen @@ -0,0 +1,39 @@ +#!/bin/sh + +## This scripts generates a new SBCL executable that embeds many useful libraries. +## This is useful to create script with low startup overhead. +## To create a script, use the following shabang: +## #!/path/to/sbclscript --script + +# TODO: Add command line option to enable debug. +# Or can we do this from scripts? Config file? +# (declaim (optimize (speed 0) (space 0) (debug 3))) + +sbcl --eval " +(mapc 'require '(sb-bsd-sockets sb-posix sb-introspect sb-cltl2 + alexandria + asdf + bordeaux-threads + cl-ppcre + cl-ppcre-unicode + closer-mop + fset + iolib + local-time + log4cl + ;; lparallel + ;; moptilities + osicat + quri + serapeum + series + str + trivia + trivial-package-local-nicknames + trivial-types + unix-opts)) +" \ + --eval " +(save-lisp-and-die (format nil \"~a/.local/bin/sbclscript\" (uiop:getenv \"HOME\")) + :executable t) +"