chiark / gitweb /
doc/list-exports.lisp: Make executable with `cl-launch' header.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 29 May 2016 13:27:39 +0000 (14:27 +0100)
doc/list-exports.lisp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index a61fe9e..65514d4
@@ -1,3 +1,7 @@
+#! /bin/sh
+":"; CL_SOURCE_REGISTRY=$(pwd)/build/src/:; export CL_SOURCE_REGISTRY
+":"; exec cl-launch -X -l "sbcl cmucl" -s asdf -i "(sod-exports::main)" -- "$0" "$@" || exit 1
+
 (cl:defpackage #:sod-exports
   (:use #:common-lisp
        #+cmu #:mop
@@ -442,7 +446,11 @@ (defun report-project-symbols ()
     (report-symbols (mapcar #'file-name (list optparse)) "OPTPARSE")
     (report-symbols (mapcar #'file-name (list utilities)) "SOD-UTILITIES"))))
 
-#+interactive
-(with-open-file (*standard-output* #p"doc/SYMBOLS" :direction :output
-                :if-exists :supersede :if-does-not-exist :create)
-  (report-project-symbols))
+(defun main ()
+  (with-open-file (*standard-output* #p"doc/SYMBOLS"
+                  :direction :output
+                  :if-exists :supersede
+                  :if-does-not-exist :create)
+    (report-project-symbols)))
+
+#+interactive (main)