add dump subcommand

This commit is contained in:
SANO Masatoshi 2014-11-16 00:48:46 +09:00
parent 5ee7ef0a06
commit ddf25c6592
2 changed files with 16 additions and 1 deletions

View file

@ -0,0 +1,15 @@
#!/bin/env ros
"dump image for faster startup"
(defun main (&rest r)
(let ((cmds (let((*read-eval*))
(read-from-string
(format nil "(~A)"(second(assoc "restart" (read-from-string (uiop/os:getenv "ROS_OPTS"))
:test #'equal)))))))
#+sbcl
(apply #'sb-ext:save-lisp-and-die
(first r)
`(,@(when cmds '(:toplevel))
,@(when cmds #'(lambda ()
(setf ros:*argv* (rest *posix-argv*))
(ros:run cmds)))))))

View file

@ -1,5 +1,5 @@
#!/bin/env ros
"output executables"
"create executables"
(defun main (&rest r)
(let ((cmds (let((*read-eval*))