X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-executable%2Fsb-executable.lisp;h=77740e009065e705603c9f2bc2cdab578d434cc3;hb=34d75fd54651830d53ebd41ddebaf6ac1c76ba62;hp=a2be573f3b48ee52a0f322e5fc7ba1533dfe4aff;hpb=d8ff33b902ee966fd772389a9f1f827a4b9576bc;p=sbcl.git diff --git a/contrib/sb-executable/sb-executable.lisp b/contrib/sb-executable/sb-executable.lisp index a2be573..77740e0 100644 --- a/contrib/sb-executable/sb-executable.lisp +++ b/contrib/sb-executable/sb-executable.lisp @@ -32,13 +32,13 @@ strategy." (defvar *exec-header* "#!/bin/sh -- -exec sbcl --noinform ~{~A ~}--eval \"(with-open-file (i \\\"$0\\\" :element-type '(unsigned-byte 8)) (loop while (< ret 2) when (= (read-byte i) 10) count 1 into ret) (load i) (funcall (quote ~A)) (quit))\" --end-toplevel-options ${1+\"$@\"} +exec sbcl --noinform ~{~A ~}--eval \"(with-open-file (i \\\"$0\\\" :element-type '(unsigned-byte 8)) (loop while (< ret 2) when (= (read-byte i) 10) count 1 into ret) (load i) (funcall (quote ~A)) (exit))\" --end-toplevel-options ${1+\"$@\"} ") (defun make-executable (output-file fasls &key (runtime-flags '("--disable-debugger" - "--userinit /dev/null" - "--sysinit /dev/null")) + "--no-userinit" + "--no-sysinit")) initial-function) "Write an executable called OUTPUT-FILE which can be run from the shell, by 'linking' together code from FASLS. Actually works by concatenating them and prepending a #! header" (with-open-file (out output-file @@ -56,6 +56,7 @@ exec sbcl --noinform ~{~A ~}--eval \"(with-open-file (i \\\"$0\\\" :element-type (let* (;; FIXME: use OUT as the pathname designator (out-name (namestring (translate-logical-pathname output-file))) (prot (elt (multiple-value-list (sb-unix:unix-stat out-name)) 3))) + #-win32 (if prot (sb-unix::void-syscall ("chmod" c-string int) out-name