forked from lem-project/lem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlem-rpc.ros
35 lines (32 loc) · 1.21 KB
/
lem-rpc.ros
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros +Q -m lem-rpc -L sbcl-bin -- $0 "$@"
|#
(progn ;;init forms
(ros:ensure-asdf)
(uiop:with-current-directory ((asdf:system-source-directory :lem))
(setf (uiop:getenv "SBCL_HOME") "")
(uiop:run-program '("qlot" "install" "--no-deps")
:output t
:error-output t)
#+quicklisp
(setf ql:*quicklisp-home*
(merge-pathnames #P".qlot/"))
(load (merge-pathnames #P".qlot/setup.lisp")))
(uiop:symbol-call :ql :quickload '(:lem-jsonrpc :lem-electron-backend :command-line-arguments) :silent t)
(uiop:symbol-call :lem-core :load-site-init))
(defpackage :ros.script.lem-rpc.3715592460
(:use :cl :command-line-arguments))
(in-package :ros.script.lem-rpc.3715592460)
(defparameter +command-line-spec+
'((("mode" #\m) :type string :optional t)
(("port" #\p) :type integer :optional t)))
(defun main (&rest argv)
(declare (ignorable argv))
(destructuring-bind (&key (mode "stdio") port)
(process-command-line-options +command-line-spec+ argv)
(let ((lem-jsonrpc::*mode* (if mode (intern (string-upcase mode) :keyword)))
(lem-jsonrpc::*port* port))
(lem:lem))))
;;; vim: set ft=lisp lisp: