introduced ros.script into *features*

This commit is contained in:
SANO Masatoshi 2014-12-11 04:32:41 +09:00
parent 2957196340
commit ad7a266b4b
2 changed files with 8 additions and 2 deletions

View file

@ -82,6 +82,7 @@
(if (probe-file arg)
(with-open-file (in arg)
(let ((line(read-line in)))
(push :ros.script *features*)
(cl:load (make-concatenated-stream
(make-string-input-stream
(format nil "(cl:setf cl:*load-pathname* #P~S)(cl:setf cl:*load-truename* (truename cl:*load-pathname*))~A" arg
@ -91,7 +92,8 @@
(make-string-input-stream
(if (eql cmd :script)
"(cl:apply 'main ros:*argv*)"
""))))))
""))))
(setf *features* (remove :ros.script *features*))))
(format t "script ~S is not exist~%" arg)))
(defun load (x file)

View file

@ -14,14 +14,18 @@ exec ros -- $0 "$@"
(in-package :t.roswell)
(setf *default-reporter* :list)
(plan 1)
(plan nil)
(mapc (lambda (x)
(diag (format nil "testing ~a" (pathname-name x)))
(load x))
(sort (directory (make-pathname :defaults *load-pathname* :name :wild :type "lisp"))
#'string< :key #'pathname-name))
#+:ros.script
(defun main (&rest r)
"roswell require main function"
(declare (ignore r))
(finalize))
#-:ros.script
(finalize)