lw-vim-mode v5 posted; see http://theclapp.org/blog/posts/lw-vim-mode_v5_posted/.
Save the image. Don't use DELIVER, I want a full image with the GUI environment and the compiler and everything.
Usage:
lispworks-5-0-0-x86-linux -siteinit - -init save-image-shell-app.lisp
; save-image-shell-app.lisp
(load-all-patches); Load ASDF
(load "/my/path/to/asdf")
(setf asdf:*central-registry*
(append asdf:*central-registry*
(list "/my/home/lisp/systems/")))(toggle-source-debugging t)
(setf hcl:*load-fasl-or-lisp-file* :load-newer-no-warn)
(load "~/lisp/shell-app")
(setf lw:*init-file-name* "~/.lw-console") ; use this instead of ~/.lispworks
(sys:define-top-loop-command :q () (quit)) ; use :q at the repl (if any) to quit
(save-image "~/bin/lw-console"
:restart-function #'shell-app-main
:environment nil
:multiprocessing t
:clean-down t)
(quit)
And the loaded code:
; shell-app.lisp(in-package :cl-user)
(defvar *argv* nil)
;;; main function after save
(defun shell-app-main ()
(if (cdr sys:*line-arguments-list*)
(let* ((*argv* (cdr sys:*line-arguments-list*))
(shell-file (first *argv*)))
;; read the shell file
(read-shell-file shell-file)
(quit))
; if no cmd-line args, start a listener
(start-tty-listener)))(defun read-shell-file (name)
(let ((compiled-version (probe-file (merge-pathnames (make-pathname :type "ufasl") name))))
(if compiled-version
(load compiled-version)
(with-open-file (shell-stream name :direction :input)
;; discard 1st line (the #!)
(read-line shell-stream)
;; load rest of file and run it
(load shell-stream)))));;; ensure that load is quiet
(setf *load-verbose* nil)
; (setf sys::*demand-load-verbose* nil) ; optional
Hmm, I realize now that update-mirrors uses a small shell script ("drs") I wrote to make rsync look a little more like scp, provide a couple of default options, etc. So you can edit update-mirrors to call rsync directly (or email me and I will), or write your own "drs" script. (Given that my drs script is quite specific to my needs, and has the names of my employer and some servers in it, I'd just as soon not fiddle with it unless somebody actually wants it. It's fun shouting into the void and all, but unless somebody actually wants to use the fruits of my labor I see no reason to bother. :)

