Summary (haven't tried it yet):
The first line of a shell file must be:(in-package :cl-user)(defvar *argv* nil)
;;; main function after save
(defun shell-app-main ()
(let* ((*argv* (cdr sys:*line-arguments-list*))
(shell-file (first *argv*)))
;; read the shell file
(read-shell-file shell-file)))(defun read-shell-file (name)
(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)
And the deliver script as used by the author (not me, the guy that wrote the above script):
Looks pretty nifty.(load-all-patches)
;; our local lisp library
(setf (logical-pathname-translations "lib")
'(("**;*.*.*" #P"/Users/stoney/Developer/Lisp/Library/**/")))#-:mk-defsystem (load "lib:defsystem")
(mk:add-registry-location "lib:defsystem-registry;")#-:asdf (load "lib:asdf")
(pushnew "lib:asdf-install-dir;" asdf:*central-registry* :test #'equal)#-:asdf-install (load "lib:asdf-install;load-asdf-install")
(load "~/Developer/Lisp/Projects/LW Shell App/shell-app")
(deliver #'shell-app-main "~/bin/lispworks-console" 0)
(quit)